• Resolved kiriska

    (@kiriska)


    SLB is supposed to be active in all custom post types by default, right?

    I have a custom post type “Comics” which loads the WP default gallery for each post, but SLB does not seem to apply to it, even after manual activation in the custom post type template:

    <?php 
    $content = apply_filters( 'the_content', get_the_content() );
    if ( function_exists('slb_activate') ) {
        $content = slb_activate($content);
    }
    echo $content;
    ?>

    Example: https://kiriska.com/comic/wolves-not-afraid/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, yes, custom post types are fully supported as long as the theme template used for the CPT meets SLB’s basic requirements.

    Can you please post the full template used to output the “Comics” CPT? Using the_content() should suffice. Manual activation is not necessary.

    Can you also please provide a screenshot of SLB’s options page so that I can match your settings when attempting to reproduce your issue.

    Once you provide the CPT’s theme template and options screenshot, I’ll take a look and see what can be done to resolve your issue.

    Thanks.

    Thread Starter kiriska

    (@kiriska)

    Here’s the full template code for the CPT: https://pastebin.com/M8NvWycq
    Screenshot of settings page: https://i.share.pho.to/8940913e_o.png

    Plugin Author Archetyped

    (@archetyped)

    Hi, it looks like the images on that page may be output separately from the post content itself. As such, they will need to be manually activated.

    Replace:

    <?php echo do_shortcode('[gallery]'); ?>
    

    With:

    <?php echo ( function_exists('slb_activate') ) ? slb_activate( do_shortcode('[gallery]') ) : do_shortcode('[gallery]'); ?>
    
    Thread Starter kiriska

    (@kiriska)

    That did it! Thank you so much for your help. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not working on custom post type’ is closed to new replies.