__( 'Primary Menu', 'nuntius' ),
'secondary' => __( 'Secondary Menu', 'nuntius' ),
'footer-menu' => __( 'Footer Menu', 'nuntius' ),
) );
// This theme allows users to set a custom background.
add_theme_support( 'custom-background' );
// Define the minimum image width for the featured slider
define ( 'NUNTIUS_FEATURED_IMAGE_WIDTH', 640 );
// This theme uses post thumbnails.
add_theme_support( 'post-thumbnails' );
add_image_size( 'nuntius-slideshow-large', 640, 430, true );
add_image_size( 'nuntius-thumbnail', 100, 75, true );
// Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
function nuntius_page_menu_args( $args ) {
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'nuntius_page_menu_args' );
}
endif;
// Load the scripts necessary to run our featured posts slider
function nuntius_scripts() {
wp_enqueue_style( 'nuntius-style', get_stylesheet_uri() );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
wp_enqueue_script( 'nuntius-jcycle', get_template_directory_uri().'/js/jquery.cycle.all.js', array( 'jquery' ), '20130415' );
wp_enqueue_script( 'nuntius-functions-js', get_template_directory_uri().'/js/functions.js', array( 'jquery', 'nuntius-jcycle' ), '201101207' );
}
add_action( 'wp_enqueue_scripts', 'nuntius_scripts' );
if ( ! function_exists( 'nuntius_content_nav' ) ):
// Display navigation to next/previous pages when applicable
function nuntius_content_nav( $nav_id ) {
global $wp_query;
?>
%link', '' . _x( '←', 'Previous post link', 'nuntius' ) . ' %title' ); ?>
%link', '%title ' . _x( '→', 'Next post link', 'nuntius' ) . '' ); ?>
max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
← Older posts', 'nuntius' ) ); ?>
→', 'nuntius' ) ); ?>
__( 'Default sidebar', 'nuntius' ),
'id' => 'sidebar-1',
'description' => __( 'Widgets dragged here will appear in the right sidebar.', 'nuntius' ),
'before_widget' => '',
'before_title' => ''
) );
register_sidebar( array (
'name' => __( 'Header widget area', 'nuntius' ),
'id' => 'sidebar-2',
'description' => __( 'Widgets dragged here will appear inside the header area, to the right of the site title. This widget area works best with only one short widget.', 'nuntius' ),
'before_widget' => '',
'before_title' => ''
) );
register_sidebar( array (
'name' => __( 'Feature widget area', 'nuntius' ),
'id' => 'sidebar-3',
'description' => __( 'Widgets placed here will appear to the right of the featured slider, if the slider is enabled. This widget area works best with only one short widget.', 'nuntius' ),
'before_widget' => '',
'before_title' => ''
) );
}
add_action( 'widgets_init', 'nuntius_widgets_init' );
/**
* Removes the default styles that are packaged with the Recent Comments widget.
*/
function nuntius_remove_recent_comments_style() {
global $wp_widget_factory;
if ( isset( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'] ) ) {
remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
}
}
add_action( 'widgets_init', 'nuntius_remove_recent_comments_style' );
if ( ! function_exists( 'nuntius_single_post_meta' ) ) :
/**
* Prints HTML with meta information for the current post (author, date, category, and permalink), for use on content.php
*/
function nuntius_single_post_meta() {
printf( __( 'Posted by %5$s on %2$s in %6$s', 'nuntius' ),
get_permalink(),
get_the_date(),
get_author_posts_url( get_the_author_meta( 'ID' ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'nuntius' ), get_the_author() ) ),
get_the_author(),
get_the_category_list( ', ' ),
esc_attr( get_the_time() )
);
}
endif;
if ( ! function_exists( 'nuntius_tag_list' ) ) :
/**
* Prints the tags for the current post
*/
function nuntius_tag_list() {
$tag_list = get_the_tag_list( '', ', ' );
if ( '' != $tag_list && ! is_wp_error( $tag_list ) ) {
$utility_text = __( 'Tags: %1$s Permalink', 'nuntius' );
} else {
$utility_text = __( 'Permalink', 'nuntius' );
}
printf(
$utility_text,
$tag_list,
get_permalink(),
the_title_attribute( 'echo=0' )
);
}
endif;
if ( ! function_exists( 'nuntius_archive_post_meta' ) ) :
/**
* Prints HTML with meta information for the current post (author, date, category, and permalink), for use on archive.php, search.php and in the "more articles" section
*/
function nuntius_archive_post_meta() {
printf( __( ' By %3$s %5$s', 'nuntius' ),
get_author_posts_url( get_the_author_meta( 'ID' ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'nuntius' ), get_the_author() ) ),
get_the_author(),
get_permalink(),
get_the_date(),
esc_attr( get_the_time() )
);
}
endif;
if ( ! function_exists( 'nuntius_comment' ) ) :
/**
* Template for displaying individual comments and pingbacks.
* To override this walker in a child theme without modifying the comments template
* simply create your own nuntius_comment(), and that function will be used instead.
*/
function nuntius_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment; ?>
id="li-comment-">
- » ', 'nuntius' ); ?>
-
get_queried_object();
$thisCat = get_category( $cat_obj->term_id ?? null );
$parentCat = get_category( $thisCat->parent ?? null );
$cat_parents = null;
if ( ! is_wp_error( $parentCat ) && 0 !== $thisCat->parent ) {
$cat_parents = get_category_parents( $parentCat, true, '»' );
}
?>
-
»' , 'nuntius' );
if (
! is_wp_error( $cat_parents )
&& isset( $thisCat->parent )
&& $thisCat->parent != 0
) :
echo $cat_parents;
endif;
echo single_cat_title( '', false ); ?>
- » Archives' , 'nuntius' ); ?>
- » Search Results' , 'nuntius' ); ?>
- » 404 Not Found' , 'nuntius'); ?>
cat_name );
if ( isset( $category_id->category_parent ) && $category_id->category_parent > 0 ){
$cat_parents = get_category_parents( $category_id, true, '»' );
} else {
$category_link = get_category_link( $category_id );
$cat_parents = '' . $category[0]->cat_name . '»';
}
if ( ! is_wp_error( $cat_parents ) ) : ?>
-
»', 'nuntius' );
echo $cat_parents . the_title( '','', false ); ?>
-
»', 'nuntius' ); the_title(); ?>
get_queried_object();
if ( $post->post_parent == 0 ) : ?>
- »', 'nuntius' ); the_title(); ?>
ID ) );
array_push( $ancestors, $post->ID );
foreach ( $ancestors as $ancestor ) :
if ( $ancestor != end( $ancestors ) ) : ?>
-
»', 'nuntius' ); ?>
-
»', 'nuntius' ); ?>
tag based on what is being viewed.
*
* @since Nuntius 1.0
*/
function nuntius_wp_title( $title, $sep ) {
global $page, $paged;
if ( is_feed() )
return $title;
// Add the blog name
$title .= get_bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
$title .= " $sep $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
$title .= " $sep " . sprintf( __( 'Page %s', 'nuntius' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'nuntius_wp_title', 10, 2 );
/**
* Load the theme options page
*/
require get_template_directory() . '/inc/theme-options.php';
/**
* Implement the Custom Header feature
*/
require get_template_directory() . '/inc/custom-header.php';
/**
* Load the custom widgets
*/
require get_template_directory() . '/inc/widgets.php';