Support » Plugin: Full Screen Background Images » Randomize images

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

    (@kouratoras)

    You can edit the plugin.php file of the plugin and add an additional line of code just after

    $args = array(
    	'post_type' => 'cpt_background',
    	'posts_per_page' => -1,
    	'update_post_term_cache' => false, // don't retrieve post terms
    	'update_post_meta_cache' => false, // don't retrieve post meta
    );

    so as to look like:

    $args = array(
    	'orderby' => 'rand'
    	'post_type' => 'cpt_background',
    	'posts_per_page' => -1,
    	'update_post_term_cache' => false, // don't retrieve post terms
    	'update_post_meta_cache' => false, // don't retrieve post meta
    );

    Try this and let me know if it works for you.

    Thanks, that works great! (Just missing a comma in the code if anyone else needs this)

    $args = array(
    	'orderby' => 'rand',
    	'post_type' => 'cpt_background',
    	'posts_per_page' => -1,
    	'update_post_term_cache' => false, // don't retrieve post terms
    	'update_post_meta_cache' => false, // don't retrieve post meta
    );
    Plugin Author Konstantinos Kouratoras

    (@kouratoras)

    Yes, you are right about the comma! Glad to hear that works great!

    A review would be really appreciated. Thanks!

    Plugin Author Konstantinos Kouratoras

    (@kouratoras)

    Thank you sir! Topic is now resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Randomize images’ is closed to new replies.