WordPress.org

Ready to get started?Download WordPress

Forums

Simple Nivo Slider
Using Simple Nivo Slider with a custom post type? (2 posts)

  1. tharpa.osang
    Member
    Posted 2 years ago #

    Hi

    I am trying to use the Simple Nivo Slider with a custom post type. I have the post type set to use categories, and when I call the plugin and then look at the code in Firebug I see the posts, but the image location shows up as "undefined" - or rather the url for the background-image shows "http://www.mysite.com/undefined"

    If used with a regular post the plugin works fine, but for the sake of the client I would rather have a custom post type with a much simpler interface....

    any ideas?

    http://wordpress.org/extend/plugins/simple-nivo-slider/

  2. tharpa.osang
    Member
    Posted 2 years ago #

    I hacked together a potential solution: in simple-nivo-slider.php I modified the the simple_nivo_slider function by adding a new parameter so the function now starts like this:
    function simple_nivo_slider($id='slider', $category='', $type='post') {

    and then a little further down in the same function (after the other parameters and before the "# perform the query, shuffle if shuffle enabled" comment):

    $query .= '&post_type='.$type;
    
    	# perform the query, shuffle if shuffle enabled

    and it seems to work fine using the php call

    dunno if it will break any shortcodes yet - I will let people know if it does.....

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic