• Resolved you456

    (@you456)


    Hello

    I don’t want to cache twp pages of my website can you tell me how can i do so?, its very urgent for me.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, AO does not cache pages, it just optimizes CSS, JS, HTML, images & Google Fonts (depending on your config), but if you want to disable AO on a page, you could use a code snippet like this one;

    add_filter('autoptimize_filter_noptimize','you_noptimize',10,0);
    function you_noptimize() {
    	if (strpos($_SERVER['REQUEST_URI'],'twp/pages')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    the above snippet would disable AO on all URL’s that have twp/pages in them.

    hope this helps,
    frank

    Thread Starter you456

    (@you456)

    hello

    i am using WP Fastest Cache and Autoptimize than how can i do so? you have any idea?

    Thread Starter you456

    (@you456)

    i have url like mydomainname.com/offers and mydomainname.com/fghdg these two pages i want to disable

    • This reply was modified 5 years, 10 months ago by you456.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, when talking page cache check with WP Fastest Cache dev (Emre’s great).

    for AO the snippets would look like;

    add_filter('autoptimize_filter_noptimize','you_noptimize',10,0);
    function you_noptimize() {
    	if (strpos($_SERVER['REQUEST_URI'],'fghdg') !== false || strpos($_SERVER['REQUEST_URI'],'offers') !== false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    I was having some issues with it loading my maps plugin and used the above code and it worked like a charm. Thanks!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Issue with page’ is closed to new replies.