Title how does page no work in Twenty Eleven

OK, so… sprintf( __( ‘Page %s’, ‘twentyten’ ), max( $paged, $page ) ); First off – sprintf. Returns a formatted string, using variables and a type specifier to display information. For example, $house = “Mansion”; $house_number = 49; sprintf( ‘My house is a %s and its number is %d’, $house, $house_number ); Will print My … Read more

SEO module to change tag title for different listing page

Would you mind using the “description” field for tags as the SEO title? If so: add_filter( ‘single_term_title’, ‘wpse_60464_title_from_description’ ); function wpse_60464_title_from_description( $title ) { if ( ( $obj = get_queried_object() ) && ! empty( $obj->description ) ) $title = $obj->description; return $title }

How to add a span class in the post title?

Wouldn’t the simplest approach be to use a filter on the_title()? function add_span($title, $id) { return $title .’ <span class=”title_span”>’ .get_post_meta($post_id, $key, $single) .”</span>”; } add_filter(‘the_title’, ‘add_span’, 10, 2); This approach of course assumes you’re storing your span data as a meta value.

saving custom taxonomy as post title

Updated Answer: You’re trying to mix a lot of things that you don’t understand, by using the $args in wp_get_post_terms you don’t need to run the foreach to hunt for child terms (is your custom taxonomy even hierarchical anyway?). As a catch-all you can just implode the whole list and get the same result (but … Read more

Echo post title in post

Use the_title(): function add_post_content($content) { if(!is_feed() && !is_home()) { $content = the_title( ‘<p>’, ‘</p>’, FALSE ) . $content; } return $content; } add_filter(‘the_content’, ‘add_post_content’); The first two arguments are for $vefore and $after. If a post doesn’t have a title, you get not extra markup. The last argument makes the function returning the string. Otherwise … Read more