(Created page with "== Filter == <tt>pagelines_post_title_text</tt> can be used to over-write or add to the default post title. == Usage == <syntaxhighlight><?php add_filter( 'pagelines_post_tit...") |
|||
| (3 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| + | __NOTOC__ | ||
== Filter == | == Filter == | ||
| − | <tt>pagelines_post_title_text</tt> can be used to over-write or add to the | + | <tt>pagelines_post_title_text</tt> can be used to over-write or add to the text of the post title. |
== Usage == | == Usage == | ||
| Line 13: | Line 14: | ||
== Example == | == Example == | ||
| + | You have decided it's time to spice up your post titles by adding an infinity symbol to the beginning and end of each. This filter allows you to do that, and this example will show you how: | ||
| − | = | + | <syntaxhighlight> |
| + | <?php add_filter( 'pagelines_post_title_text', 'my_pagelines_post_title_text' ); | ||
| + | |||
| + | function my_pagelines_post_title_text( $title ){ | ||
| + | $title = '∞ ' . $title . ' ∞'; | ||
| + | return $title; | ||
| + | } ?> | ||
| + | </syntaxhighlight> | ||
== Source File == | == Source File == | ||
pagelines_post_title_text can be used to over-write or add to the text of the post title.
NB: pagelines_post_title_text is only meant as an example, a more appropriately named function should be used in actual code.
You have decided it's time to spice up your post titles by adding an infinity symbol to the beginning and end of each. This filter allows you to do that, and this example will show you how:
pagelines_post_title_text is defined in pagelines_get_post_title() which is located in includes/class.posts.php