WordPress.org

Forums

Dreamgrow Scroll Triggered Box
[resolved] Not working with custom post types (4 posts)

  1. Synthetica
    Member
    Posted 2 years ago #

    Is there any solution to make this plugin work with custom posttypes?

    http://wordpress.org/plugins/dreamgrow-scroll-triggered-box/

  2. Julian Magnone
    Member
    Posted 1 year ago #

    I am not the plugin author but if you still need some help and are interested to use it for custom post types (or even for any kind of page in your blog/site), this hack may work.

    Open the file index.php inside the plugin folder (plugins/dreamgrow-scroll-triggered-box/index.php), then make the function stb_visible() on line ~58 return "true" all the time and you will have it enabled for all the pages including custom post types.

    In my case, I only needed to add a new custom post type named "download" so I added the line: if ($current == 'download' ) return true; below the $current variable.

    function stb_visible()
        {
            $options = get_option('stb_settings');
            $frontpage_id = get_option('page_on_front');
            global $post;
            $postID = $post->ID;
            $current = get_post_type($postID);
    
    	if ($current == 'download' ) return true;
    ...

    If you want to see a real example you can see it in action here: http://slidemodel.com/templates/ and then scroll down to the bottom of the page, basically it will show the box in all the "download" custom post type.

  3. lemonthirst
    Member
    Posted 1 year ago #

    It would be great if this would be added as a default option for the plugin.

  4. pk2000
    Member
    Plugin Author

    Posted 1 year ago #

    This issue should be resolved now after you update to version 1.4.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Dreamgrow Scroll Triggered Box
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic