WordPress.org

Ready to get started?Download WordPress

Forums

WP Featured Content Slider
Applying plugin to custom post types? (6 posts)

  1. colleengreene
    Member
    Posted 2 years ago #

    Hello.

    I use this plugin (love it!) on several WordPress sites that only use regular posts and pages.

    I just installed it on a site that uses custom post types, however, after activating the plugin, I don't see a Featured Content Gallery option or check box in the Edit view of my custom post types.

    Does the plugin currently support custom post types? If so, what do I need to do differently? If not, how can we make this happen?

    Thanks!

    http://wordpress.org/extend/plugins/wp-featured-content-slider/

  2. wampdog29
    Member
    Posted 2 years ago #

    Wondering the same question! After digging through the code, I see MAYBE a possibility for it, but only with creating custom post types yourself and not with a plugin.

  3. vicdilu
    Member
    Posted 2 years ago #

    Hi!

    The answer is a little late, but it might help someone in the future...

    I am new in WordPress, but I think I found a solution for this. For my first WP theme I am also using custom post types and this plugin. I looked a little bit in the code of the plugin and I made a few changes:

    (in my case, my custom post types are "talleres" and "cursos")

    In content-slider.php in line 116:

    original: $args = ... 'post_type' => array('post', 'page'), ...

    change: $args = ...'post_type' => array('post', 'page', 'talleres', 'cursos'),...

    In featured-content-slider.php in line 60:

    I add two more lines for my custom post types:

    add_meta_box("feat_slider", "Featured Content Slider Options", "feat_meta", "talleres", "normal", "high");
    
    add_meta_box("feat_slider", "Featured Content Slider Options", "feat_meta", "cursos", "normal", "high");

    and in line 82 I add this:

    original:
    if($post->post_type == "post" || $post->post_type == "page")

    change:
    if($post->post_type == "post" || $post->post_type == "page" || $post->post_type == "talleres" || $post->post_type == "cursos")

    After these changes, it worked fine for me!

    I don´t know how to type very well (I still use two fingers) so I hope this effort will be helpful for someone!

  4. welshhuw
    Member
    Posted 2 years ago #

    Awesome! Thanks

  5. vdowsett
    Member
    Posted 2 years ago #

    vicdilu Thanks so much for your post, it was a great help for me today.

  6. vicdilu
    Member
    Posted 2 years ago #

    Hi!

    I am glad the post is being helpful!

    I have the plugin working fine, but the other day I realized this plugin includes a small advertisement on the footer (on the right side) If you want to remove it, you would have to delete these lines (120 to 130 in the file content-slider.php) This is the code to be deleted:

    if (!function_exists('fs_slide_credit')) {
    
    			function fs_slide_credit() {
    
    			    echo '<div class="copy_wrap" style="display: block; margin: 0px; clear: both;"><p style="font-size: 9px; text-align: right; display: block;">Slider by <a style="font-size: 9px; text-align: right;" href="http://www.aesthetic-clinic-med.de/" target="_blank" title="schönheitschirurgie">Aesthetic</a></p></div>';
    
    			}
    
    		}
    
    		add_action('wp_footer', 'fs_slide_credit');

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic