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

Why would apply_filters return a non-empty string, when the value returned is empty?

The problem is in the theme you’re using. This has been reported before: https://core.trac.wordpress.org/ticket/21430 Seems that Elegant Themes don’t like their widgets to not have titles. So they have a function called “et_widget_force_title” which changes blank titles into titles with a single space. In case of doubt, always try disabling plugins and switching to the … 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

WP Gallery showing captions twice

It looks like your WP Jquery Lightbox plugin is generating these extra captions. Check out the source of the jquery.lightbox.js file: … cut … var s=””; if (title != ”) { s=”<span id=”titleText”>” + title + ‘</span>’; } if (caption != ”) { if (title != ”){ s += ‘<br />’; } s += ‘<span … Read more

Array to modify post titles

Your example code could easily be converted to an array, like this: Updated and improved code for your new example: function manipulate_post_title( $title, $post_id ) { $title_array = array( ‘1153’ => $title . ‘-suffix’, ‘2’ => ‘prefix-‘ . $title, ‘3’ => ‘completely different title’, ); if ( is_single() && isset( $title_array[ $post_id ] ) ) … Read more