User Tools

Site Tools


themes:template_tags

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
themes:template_tags [2014/01/19 16:38]
datiswous [Echo / output functions]
themes:template_tags [2014/06/30 22:59] (current)
shawn_a [Echo / output functions]
Line 28: Line 28:
 Echos/​Returns the page's META description. No options. Echos/​Returns the page's META description. No options.
  
-==Not active:==+==Not active ​yet:==
 <​del>​==get_page_meta_description( $echo=true )== <​del>​==get_page_meta_description( $echo=true )==
 <​code><?​php get_page_meta_description();​ ?></​code>​ <​code><?​php get_page_meta_description();​ ?></​code>​
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 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 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 77: Line 77:
 Echos/​Returns the website'​s title. Options: TRUE for "​return",​ leave blank for "​echo"​. Site name is taken from the settings page.  Echos/​Returns the website'​s title. Options: TRUE for "​return",​ leave blank for "​echo"​. Site name is taken from the settings page. 
  
-==Not active:==+==Not active ​anymore:==
 <​del>​==get_site_email( $echo=true )== </​del>​ <​del>​==get_site_email( $echo=true )== </​del>​
 <​del><​code><?​php get_site_email();​ ?></​code></​del>​ <​del><​code><?​php get_site_email();​ ?></​code></​del>​
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 )==
themes/template_tags.1390149494.txt.gz · Last modified: 2014/01/19 16:38 by datiswous