Randomize posts in Slider

  • vegastalkradio

    #6481

    I have selected random posts in the slider setup, however it still rotates ignoring the choice. URL is http://Regency.com

    You can see the list on the left sidebar from the posts and the order is the same.

    I am using a plugin called “Post Types Order” which allows you to drag and drop to eorder your posts. I use to alphabetize the list.

    Any ideas why this won’t randomize?

    Everything is up to date on current versions.

    Admin

    Syahir Hakim

    #34490

    Try disabling the Post Types Order plugin to see if it’s a conflict with the plugin.

    vegastalkradio

    #34491

    It works when I disable Post Types Order plugin.

    I really need the ability to arrange the posts in Alphabetical order though, so any suggestions of other plugins which can do this and still randomize? I don’t want to change publish dates, would take too long and when others are added, it would be bad.

    If there is a conflict, then maybe renaming some function or variable in the theme or plugin?

    Any ideas Please? I love the theme but so far have found a couple of other plugins that don’t function eith this theme but do fine with the standard WP themes 2010, 2011, etc.

    THANKS!!!!!

    Admin

    Syahir Hakim

    #34492
    Quote:
    If there is a conflict, then maybe renaming some function or variable in the theme or plugin?

    No, because it’s not a naming conflict. Basically, the plugin is overriding the parameters that the theme passes to WordPress when fetching the posts for the slider.

    There may be a way to prevent the plugin from overriding the parameters, but you’ll need a child theme to try it. Create a child theme first and then post back here when you’ve done it.

    vegastalkradio

    #34493

    Ok, I now have it running on a child theme

    Admin

    Syahir Hakim

    #34494

    Create a functions.php in your child theme’s folder. Then, add this code:

    <?php
    function graphene_custom_slider_args( $args ){
    $args['suppress_filters'] = 1;
    return $args;
    }
    add_filter( 'graphene_slider_args', 'graphene_custom_slider_args' );

    vegastalkradio

    #34495

    I added it to the function.php file in the child template. Still does not work.

    Here is the code in that file:

    <?php
    /**
    * VTRGraphene functions and definitions added to Graphene template
    */

    function favicon_link() {
    echo '<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />' . "n";
    }
    add_action('wp_head', 'favicon_link');

    function graphene_custom_slider_args( $args ){
    $args['suppress_filters'] = 1;
    return $args;
    }
    add_filter( 'graphene_slider_args', 'graphene_custom_slider_args' );
    ?>

    URL is http://regency.com

    Here is the Graphine settings:

    GSet.jpg

    Prasanna SP

    #34496

    Put code in between backtick (

    Code:
    `

    ) characters. It’s usually located above the Tab key on your keyboard. I’ve updated your post.

    vegastalkradio

    #34497

    Sorry, but I don’t understand what you mean. I copied your code exactly and pasted it. Can you reexplain it in different words or an example? THANKS!

    Admin

    Syahir Hakim

    #34498

    In that case, try asking the plugin author if there’s any way to exclude certain custom WP_Query calls from the plugin, as he’s much more familiar with the code plugin’s code.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.