[Resolved] Taxonomy from WP recipe maker & GP blog compatibility

Home Forums Support [Resolved] Taxonomy from WP recipe maker & GP blog compatibility

Home Forums Support Taxonomy from WP recipe maker & GP blog compatibility

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2169057
    Christine

    Hi! I have WP recipe maker on my site and when I ask it to make an archive page for one of the taxonomies it has created, it picks up my GP element for the content template, but it doesn’t pick up the message that it’s supposed to be a grid with three columns and spacing. It’s all on one column and no space inbetween.

    I’ve posted privately the link where you can see this. Is there a way to fix it to look like the others?

    Thanks!

    #2169060
    Christine

    P.S. Not sure if it’s relevant here but I have some css customization of the blog page already to make it compatible with facetwp. https://generatepress.com/forums/topic/facet-wp-with-blog-archive/#post-2118241

    #2169202
    Fernando
    Customer Support

    Hi Cristine,

    The reason why the columns functionality isn’t woking is because the Archive page created by your plugin is a Custom Post type archive.

    To make the column settings take effect in Custom Post Type Archives as well, you’ll need to add a Custom PHP snippet.

    Specifically, this:

    add_filter( 'generate_blog_columns', function( $columns ) {
        if ( 'CPT_SLUG' === get_post_type() && ! is_singular() ) {
            return true;
        }
    
        return $columns;
    } );

    Kindly replace CPT_SLUG with the slug name of the CPT created by the plugin. Please reach out to the plugin support of WP recipe maker for assistance with regards to the slug name.

    Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

    Adding it through Code Snippets should work.

    Reference :https://docs.generatepress.com/article/using-columns-in-the-blog/#adding-columns-to-your-custom-post-type

    Hope this helps. 🙂

    #2169575
    Christine

    Got it!
    Thanks very much!

    #2170506
    Fernando
    Customer Support

    You’re welcome Christine! Glad to be of assistance! Feel free to reach out anytime if you’ll need assistance with anything else. 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.