__( 'Primary Menu', 'skt-pathway' ),
) );
add_theme_support( 'custom-background', array(
'default-color' => 'eae9e9'
) );
add_editor_style( 'editor-style.css' );
}
endif; // skt_pathway_setup
add_action( 'after_setup_theme', 'skt_pathway_setup' );
function skt_pathway_widgets_init() {
register_sidebar( array(
'name' => __( 'Blog Sidebar', 'skt-pathway' ),
'description' => __( 'Appears on blog page sidebar', 'skt-pathway' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer Wdget 1', 'skt-pathway' ),
'description' => __( 'Appears on Footer', 'skt-pathway' ),
'id' => 'footer-1',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Wdget 2', 'skt-pathway' ),
'description' => __( 'Appears on Footer', 'skt-pathway' ),
'id' => 'footer-2',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Wdget 3', 'skt-pathway' ),
'description' => __( 'Appears on Footer', 'skt-pathway' ),
'id' => 'footer-3',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'skt_pathway_widgets_init' );
if ( !function_exists( 'optionsframework_init' ) ) {
define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/inc/' );
require_once dirname( __FILE__ ) . '/inc/options-framework.php';
}
function skt_pathway_scripts() {
wp_enqueue_style( 'skt_pathway-gfonts', '//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600italic,600,700,700italic,800,800italic' );
wp_enqueue_style( 'skt_pathway-basic-style', get_stylesheet_uri() );
wp_enqueue_style( 'skt_pathway-editor-style', get_template_directory_uri()."/editor-style.css" );
wp_enqueue_style( 'skt_pathway-nivoslider-style', get_template_directory_uri()."/css/nivo-slider.css" );
wp_enqueue_style( 'skt_pathway-base-style', get_template_directory_uri()."/css/style_base.css" );
wp_enqueue_script( 'skt_pathway-nivo-script', get_template_directory_uri() . '/js/jquery.nivo.slider.js', array('jquery') );
wp_enqueue_script( 'skt_pathway-custom_js', get_template_directory_uri() . '/js/custom.js' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'skt_pathway_scripts' );
function media_css_hook(){
$output = '';
$output ='
';
echo $output;
}
add_action('wp_head','media_css_hook');
function skt_pathway_custom_head_codes() {
if ( (function_exists( 'of_get_option' )) && (of_get_option('style2', true) != 1) ) {
echo "";
}
}
add_action('wp_head', 'skt_pathway_custom_head_codes');
function skt_pathway_pagination() {
global $wp_query;
$big = 12345678;
$page_format = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages,
'type' => 'array'
) );
if( is_array($page_format) ) {
$paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
echo '';
}
}
/**
* Implement the Custom Header feature.
*/
require get_template_directory() . '/inc/custom-header.php';
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';
/**
* Load custom functions file.
*/
require get_template_directory() . '/inc/custom-functions.php';
function skt_pathway_custom_blogpost_pagination( $wp_query ){
$big = 999999999; // need an unlikely integer
if ( get_query_var('paged') ) { $pageVar = 'paged'; }
elseif ( get_query_var('page') ) { $pageVar = 'page'; }
else { $pageVar = 'paged'; }
$pagin = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?'.$pageVar.'=%#%',
'current' => max( 1, get_query_var($pageVar) ),
'total' => $wp_query->max_num_pages,
'prev_text' => '« Prev',
'next_text' => 'Next »',
'type' => 'array'
) );
if( is_array($pagin) ) {
$paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
echo '';
}
}
// get slug by id
function skt_pathway_get_slug_by_id($id) {
$post_data = get_post($id, ARRAY_A);
$slug = $post_data['post_name'];
return $slug;
}
// Add custom script in admin footer
function custom_admin_footer_js() {
echo '"';
}
add_action('admin_footer', 'custom_admin_footer_js');
function remove_header_menu(){
remove_submenu_page( 'themes.php', 'custom-header' );
}
add_action( 'admin_menu', 'remove_header_menu', 999 );
?>