• soulgeek

    (@soulgeek)


    Folks,

    Need Urgent Help!

    I See Amazon Products on my Blog.

    In Posts pages I want to cache only the Text Widget Outputs and not the Post Content, may be a Certain Part of the Post which is Amazon Product Prices, If i cache my post, them amaozn Product Prices will not update each 24 Hours and its Against Amazon TOS. ??

    Question: 1
    Is there any Solution that i put tags like:

    <donotcache>

    $Amazon_Product_price

    </donotcache>

    This will Cache the whole Post + Widgets Except what is there in the <donotcache> Tags.

    If this thing is not Possible then please see the below Question:

    Question 2:
    How to Cache the Text Wedget Outputs But not the Post Content?

    Please, i need help on this.

    Thanks All!

    https://www.ads-software.com/extend/plugins/wp-super-cache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m afraid it’s not that simple. Look in the readme file for the mfunc function.

    Thread Starter soulgeek

    (@soulgeek)

    Brother donncha,
    Thanks for the Beautiful Piece of Work in the form of WP Super Cache. Love it!

    I checked my Single.php file and the below are the two lines that give me the Price and List price which i want to keep dynamic but cache the rest of the Post as well as all the Text Widget Outputs.

    What i want to keep Dynamic is Below:

    $price = get_post_meta($post_ID, ‘price’, true);
    $listprice = get_post_meta($post_ID, ‘listprice’, true);

    echo $price;
    echo $listprice;

    I want to keep only the output of $price and $listprice NON-Cached.

    I am already in Half-Mode ON.


    What i have done is:

    `<!–mfunc function_name( ‘parameter’, ‘another_parameter’ ) –>
    $price = get_post_meta($post_ID, ‘price’, true);
    $listprice = get_post_meta($post_ID, ‘listprice’, true);
    <!–/mfunc–>`

    echo $price;
    echo $listprice;

    Is this correct? No? What can be the right codes or what else do i have to do?

    Thanks Donnacha…..
    soulgeek

    Almost, instead of “function_name” you’ll call your own function that defines and prints the $price and $listprice variables.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Super Cache] ##HELP## How to cache certain Portion of Post and Widget Output?’ is closed to new replies.