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.

Title don’t function as link

You need to put it inside the <h3> tags: <h3 class=”slide_title”> <a href=”https://wordpress.stackexchange.com/questions/82417/<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”> <?php $long_title = get_the_title(); $short_title = substr( $long_title, 0, 55 ); if ( strlen( $long_title ) !== strlen( $short_title )) { echo $short_title . ‘&hellip;’; } else { echo $short_title; } ?> </a> </h3><!– .slide_title –> I’ve … Read more

Inconsistent title for posts

There is actually nothing you can do about this. Google changed their algorithm a few months ago where they will sometimes determine the title in their results if they feel it’s a better fit. I noticed this when working on the SEO for the last company I worked for. When searching “channel letters detroit” the … Read more

How to set “lang” attribute for post/page title?

There is a the_title filter. You should be able to wrap the title in a <span> using that. add_filter( ‘the_title’, function($title) { return ‘<span lang=”ur”>’.$title.'</span>’; } ); A version compatible with an older PHP: function lang_attr_wpse_116733($title) { return ‘<span lang=”ur”>’.$title.'</span>’; } add_filter(‘the_title’,’lang_attr_wpse_116733′); If it were me, I’d add a checkbox on the post edit screen … Read more

How do I remove ‘Home’ from homepage title?

You can add a check to see if the current page is the home page, and if so skip adding the page title. This would make the final code look like this: <title><?php global $page, $paged; // Add the page title if not the front page if ( is_front_page() ) { wp_title( ‘|’, true, ‘right’ … Read more

Text under post title on frontpage but don’t want it in full post

Tested this and it worked perfectly on Genesis. You can also use HTML tags in the custom field. add_action( ‘genesis_entry_header’, ‘content_after_archive_title’, 15 ); function content_after_archive_title() { if ( is_home() && genesis_get_custom_field(‘after-title’) ) : echo ‘<div class=”after-title”>’. genesis_get_custom_field(‘after-title’) .'</div>’; endif; } Uses the native custom fields meta box which you can reposition under the Editor. You … Read more