This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
themes:template_tags [2014/01/19 23:01] datiswous [Echo / output functions] |
themes:template_tags [2014/06/30 22:59] (current) shawn_a [Echo / output functions] |
||
---|---|---|---|
Line 59: | Line 59: | ||
==get_header( $full=true )== | ==get_header( $full=true )== | ||
<code><?php get_header(); ?></code> | <code><?php get_header(); ?></code> | ||
- | Echos the page's header. No options. This automatically creates the 4 meta tags ('description', 'keywords', 'canonical' and 'generated'). If ''$full'' is FALSE, will not generate the ''<link rel="canonical" ...>''. Place this code within your theme's ''<head>'' ''</head>'' tags. **Many plugins need this tag to be in place.** | + | Echos the page's header. No options. This automatically creates the 2 meta tags (<del>'description',</del> 'keywords', 'canonical'<del> and 'generated'</del>). If ''$full'' is FALSE, will not generate the ''<link rel="canonical" ...>''. Place this code within your theme's ''<head>'' ''</head>'' tags. **Many plugins need this tag to be in place.** |
==get_footer()== | ==get_footer()== | ||
Line 93: | Line 93: | ||
==get_navigation( $currentpage = get_page_slug(false), $classPrefix = "" )== | ==get_navigation( $currentpage = get_page_slug(false), $classPrefix = "" )== | ||
<code><?php get_navigation( 'tour' ); ?></code> | <code><?php get_navigation( 'tour' ); ?></code> | ||
- | Returns a list of pages that are added to the main menu from each of their edit screens. Required option is what is shown above. This creates a class of 'current' on the ''<li>'' element that is currently the active page. You need to supply the ''<ul>'' or ''<ol>'' | + | Returns a list of pages that are added to the main menu from each of their edit screens. Required option is what is shown above. This creates a class of 'current' on the ''<li>'' element that is currently the active page. You need to supply the ''<ul>'' or ''<ol>''. |
+ | |||
+ | ''get_navigation'' will add a class to each menu ''<li>'' with the id of the menu items slug, if these slug classes conflict with other css rules (BUG #605), say generic ones such as ''.menu'' ''.main'' then you can add an optional prefix that will be prepended to the class names to make them more unique and less likely to conflict with other classes. | ||
==menu_data( $id = null, $xml=false )== | ==menu_data( $id = null, $xml=false )== |