DISQUS

DISQUS Hello! Elliott Back's Blog is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

Getting WP-Cache to Work

Started by elliottback · 8 months ago

No excerpt available. Jump to website »

12 comments

  • How did you get your search to function dynamically? I have also implemented WP_Cache on my site, but for the life of me I cant figure out how to get my search function to work. Any tips would be greatly appreciated!

    If youre feeling really helpful, this is the code for my search that no longer works

    My Search
  • To be honest, Nick, I can't really tell you why it doesn't work since I can't find a search box on your homepage!! Most likely its a javascript bug?
  • Hmm, not sure either. But yeah, I took the search box off of the mainpage. Im just not sure how to use the mclude thing. Aw well, Ill keep poking around. Thanks.
  • I put the search function back on my site, if you could check it out. I made a page called search.php with my search form on there. Then I called it like this

    <!--mclude /search.php-->
    <?php include_once(ABSPATH . '/search.php'); ?>
    <!--/mclude-->

    But, it just gives me this single page with the word I searched for...
  • OK, Nick. Here's exactly how the search works on my site. In the folder wp-content/themes/greenmarinee/sidebar.php, there's a chunk that reads:

    <h3>The Search</h3>

    search site archives


    <div id="search">
    <div id="search_area">
    <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <input class="searchfield" type="text" name="s" id="s" value="" title="Enter keyword to search" />
    <input class="submit" type="submit" value="" title="Click to search archives" />
    </form>
    </div>
    </div>

    As you can see, all it does is call the wordpress engine with an "s" parameter--and it's the default search of the template. WP-Cache will then cache the results page that WP spits out.
  • Hello Elliott.

    I have been trying to work out how to make my dynamic plugins work with wp-cache.

    One of the plugins in question is this adrotator (from: http://blog.taragana.com/index.php/archive/word...).

    I made a file called: tbcode.php

    With this in it (that's the code used to call the adrotator plugin normally):



    And then put this in my template:

    <!--mclude tbcode.php-->
    <!--/mclude-->

    Note the tbcode.php file is on the base directory.

    It seems to work the first time fine (it produces the advert banner) but upon refresh it does not work at all.

    I get this error:

    Fatal error: Call to undefined function: getad() in /home/XXXXXX/public_html/tbcode.php on line 1

    Any help or pointers would be apprecited (feel freet to email).

    Thanks. Francis.
  • Do you know how can i make the sidebar or widgets to load dynamically with wp-cache? I have a hard time trying to let my online counter work again ...
  • Okay, I'm an id10t, I'll admit. But I'm looking at my wp-cache files, trying to figure out what the heck the "the regular 'load and output file'" section is so I can replace it with the suggested code, above.

    I'm at sea, here. Exactly what portion of WP-cache code do I replace?

    Rich.
    BlogRodent
  • My site got slashdotted last night and I had to enable the cache plugin to make it load again. I have troubles understanding one concept and I thought maybe you could help me understand it.

    What is happening to adsense scripts when they are cached ? Is the javascript cached or the output of the javascript ? The first would mean that people would see wrong ads while the latter would mean everything is running as usual.

    It would be nice if you could answer the question ;)

    regards
    Martin
  • I've been trying to get wp-cache switched on and yet give me dynamic postviews and recentcomments... I tried using your code (changing the path and plugin files) and inserted it in my theme file... but am getting errors probably because the plugins themselves are looking for other functions in files the wp-cache prevents from reaching (speculating as am not a programmer).

    For post views to work I included the following code as you mentioned it:










    It error-ed out giving a message that it was could not find the function name in the postviews.php

    Stuck.

    Wasn't clear where to include/modify in what files the other pieces of code you have mentioned before the calling plugin code.
  • I think your syntax/format is not correct with mclude. I was able to successfully get it to work by using the following:


    <!--mclude wp-content/themes/mytheme/dynamictest.php-->
    <!--/mclude-->


    with NO slash before 'wp-content' for the first path.
  • hii there i receive this message occasionally on my blog..
    i have de activate the plugin..but this error still came about..do you know why it's still looking for this file..i believe tehre are still a few lines in my wp-settings.php asking for advanced-cache.php and i still have advanced-cache.php on my blog..

    how do i remove them without affecting my blog?

    Warning: require(/home/syokkahw/public_html/blog/wp-content/advanced-cache.php) [function.require]: failed to open stream: No such file or directory in /home/syokkahw/public_html/blog/wp-settings.php on line 69

    Fatal error: require() [function.require]: Failed opening required '/home/syokkahw/public_html/blog/wp-content/advanced-cache.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/syokkahw/public_html/blog/wp-settings.php on line 69

Add New Comment

Returning? Login