Support » Plugin: Genesis Custom Post Types Archives » Strange header output – help please

  • Hi there,

    Some weird behavior I just found – when searching for certain words using WP’s builtin search widget, the search results page displays the gcpta_keywords for the first post in the results at random in the <head>. In my case, I did a search for “the” and the resulting page had a “grantee” custom post type as the first result. For some reason it looks like your plugin is outputting the keywords specified in the CPTs Archives settings page for this post type on the search results page, as well as on actual archive pages.

    I’ve traced back the issue as arising in the following function in the Custom Post Types Archives function:

    function gcpta_header_scripts() {
    	global $post;
    	echo apply_filters( 'gcpta_header_scripts' , genesis_get_option( 'gcpta_keywords_' . $post->post_type, 'gcpta-settings-' . $post->post_type ) );

    Look like you might need some conditionals somewhere to prevent this from happening. Not sure where else this issue could arise, but might a simple if ( !is_search() ) suffice?

Viewing 1 replies (of 1 total)
  • PS – just to mention, I’m using the Types plugin for my custom post types – this might also be part of the problem.

Viewing 1 replies (of 1 total)
  • The topic ‘Strange header output – help please’ is closed to new replies.