tbkcp_theme_functions.php | |
An assortment of re-usable theme functions | |
tbkcp_theme_functions | An assortment of re-usable theme functions |
Functions | |
get_nested_archives | Gets a year/month list of archives |
get_top_parent | Gets the top most parent page’s title and id |
get_tag_list | Returns a comma seperated list of all the post tag names |
get_category_list | Returns an array of linked post categories |
get_child_or_sibling_pages | Get the child pages if on parent or sibling pages if in parent. |
get_category_list | Return page/post/custom-post data by slug |
get_breadcrumbs | Returns a linked list of the breadcrumb trail |
has_children | Checks if a certian page/post/custom-post has children |
wp_list_post_types | Lists out post types in the wp_list_pages style (called by get_child_or_sibling_pages if custom post type detected) |
An assortment of re-usable theme functions
Functions | |
get_nested_archives | Gets a year/month list of archives |
get_top_parent | Gets the top most parent page’s title and id |
get_tag_list | Returns a comma seperated list of all the post tag names |
get_category_list | Returns an array of linked post categories |
get_child_or_sibling_pages | Get the child pages if on parent or sibling pages if in parent. |
get_category_list | Return page/post/custom-post data by slug |
get_breadcrumbs | Returns a linked list of the breadcrumb trail |
has_children | Checks if a certian page/post/custom-post has children |
wp_list_post_types | Lists out post types in the wp_list_pages style (called by get_child_or_sibling_pages if custom post type detected) |
function get_category_list()
Returns an array of linked post categories
global $included_modules; if (class_exists('tbkcp_theme_functions')) { $tbktf = $included_modules['tbkcp_theme_functions']; $categories = $tbktf->get_category_list(); echo implode(',',$categories); }
function get_child_or_sibling_pages( $new_args = array(), $post = null )
Get the child pages if on parent or sibling pages if in parent. Can accept custom post types
global $included_modules; <ul> <?php global $included_modules; if (class_exists('tbkcp_theme_functions')) { $tbktf = $included_modules['tbkcp_theme_functions']; $args = array( 'link_before' => '<span class="icon"></span>' ); $tbktf->get_child_or_sibling_pages($args); } ?> </ul> * Parameters* @$new_args: a set of wp_list_pages (wordpress) args @post : a specific post id. Defaults to global $post
function has_children( $new_args = array() )
Checks if a certian page/post/custom-post has children
global $included_modules; if (class_exists('tbkcp_theme_functions')) { $tbktf = $included_modules['tbkcp_theme_functions']; $args = array( 'post_type' => 'product' ); $children = $tbktf->has_children($args); }
function wp_list_post_types( $args )
Lists out post types in the wp_list_pages style (called by get_child_or_sibling_pages if custom post type detected)
global $included_modules; if (class_exists('tbkcp_theme_functions')) { $tbktf = $included_modules['tbkcp_theme_functions']; $tbktf->wp_list_post_types($args); } * Parameters* @$args: a set of wp_list_pages (wordpress) args
Gets a year/month list of archives
function get_nested_archives()
Gets the top most parent page’s title and id
function get_top_parent()
Returns a comma seperated list of all the post tag names
function get_tag_list()
Returns an array of linked post categories
function get_category_list()
Get the child pages if on parent or sibling pages if in parent.
function get_child_or_sibling_pages( $new_args = array(), $post = null )
Returns a linked list of the breadcrumb trail
function get_breadcrumbs()
Checks if a certian page/post/custom-post has children
function has_children( $new_args = array() )
Lists out post types in the wp_list_pages style (called by get_child_or_sibling_pages if custom post type detected)
function wp_list_post_types( $args )