Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi Piet,

    The custom SEO settings require at least Title and Editor (content) support for the CPT.

    Some taxonomies have unexpected behavior and I will be sure to look into a pattern for a future update.

    Until then, which plugin/script did you use to add the CPT?
    I’ve made a small script for the Genesis Author Pro plugin to add custom titles. You can find it here.

    Exchange the ‘books’ query variable with the CPT you’ve got in the is_genesis_books_archive() function, and the rest should speak for itself, I think :).

    If you require any assistance implementing such extension, feel free to ask for support!

    I hope this helps, thanks and have a great day!

    Thread Starter Pieter Bos

    (@senlin)

    Hi Sybre,

    Thanks for your reply.

    Usually I use generatewp.com to generate the code for my CPTs and CTXs.

    I am going to have a look at the code snippet you referred to and will let you know how that goes.

    Cheers,
    Piet

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi Piet,

    I just remembered, in many cases, the following filter should also add the Metabox to the page. Just be aware that this might cause a fatal error on the CPT edit screen.
    This is because of a memory leak as no Title or content can be found, although I’m pretty sure I prevented this from happening again after I found it.

    This filter will also make sure those CPT appear in the Sitemap. Its side-effects are unknown, as I said: some CPT have unexpected behavior.
    So, if the sitemap crashes, wrap this filter hook in the admin_init hook to prevent that from happening:

    add_filter( 'the_seo_framework_supported_post_types', 'my_cpt_add_seo_settings' );
    function my_cpt_add_seo_settings( $types ) {
    
    	$types[] = 'my-cpt-type';
    	$types[] = 'my-other-cpt';
    
    	return $types;
    }

    I hope this helps :).

    Thread Starter Pieter Bos

    (@senlin)

    Hi Sybre,

    The metabox displays on the CPTs, that is not the issue. The issue is how to get the title and meta description I want on the CPT Archive page.

    As far as I know that page is dynamically generated and you can adjust the output via your own template archive-[CPT-slug].php, but that doesn’t let me add the title or meta-description.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi Piet,

    I’m unsure if you can hook into the plugin’s filters within that file. It might be that the header is then already run. Of course, I could be wrong and I’ve never used such file.

    Could you show me the files/code you’re using to output the CPT? Either through these forums within back-ticks our through a zip at my contact page. I’ll have a look at it and I’ll see what the solution to this will be :).

    Thanks!

    Thread Starter Pieter Bos

    (@senlin)

    Hi Sybre, left you a message on your contact form, thanks,
    Piet

    Hi, is there any more updates on how to set Title/Meta for custom post type archive pages? In Yoast there was an option to edit the meta for all registered post types within the Yoast admin.

    Cheers

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @tkirtley,

    There’s a GitHub issue on this subject:
    https://github.com/sybrew/the-seo-framework/issues/20

    I still have to set a due date and release version. More on that will be described in that issue when the time comes.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How/where to set the title and description for CPT archives?’ is closed to new replies.