• Resolved agrean

    (@agrean)


    Hi. I have a random post or random slider on almost all of my pages, including the homepage. However, these do not work properly. It does not show randomly. I guess this is about the dynamic setting. I want the posts or sliders on my entire page to be displayed randomly. Can you help with this? Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @agrean,
    You are right. When a page is cached and being served via CDN, your PHP codes and logic doesn’t get executed and instead the page gets served how it was cached. If you have a random post slider, you cannot u see PHP generate the random posts, instead, you have to use javascript fetch/ajax to pull the posts randomly and show them. As even when a page is cached the JS async calls will work perfectly.

    Thread Starter agrean

    (@agrean)

    Thank you for answer. I have one more question. I started using wp-rocket and in the wp-content / cache folder there are these folders wp-rocket created. Should I delete any of these folders? I disabled cache and preloader in wp-rocket. I have enabled “Disable WP Rocket page cache” and “Fallback Cache” in your plugin. Is there anything else I should do? Would it be a problem to use preloader fonts in wp-rocket? thanks.

    View post on imgur.com

    • This reply was modified 3 years, 8 months ago by agrean.
    Plugin Contributor iSaumya

    (@isaumya)

    Hi @agrean,
    Those folders are being used by WP rocket for static file optimization. But you really don’t need wp rocket with this plugin (honestly).
    This plugin + Autoptimize + Shortpixel is a killer combo in my opinion.

    Thread Starter agrean

    (@agrean)

    Maybe you are right, but although I have tried all combinations of settings with Autopmize, it unfortunately break my website.

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