Forum Replies Created

Viewing 15 replies - 46 through 60 (of 114 total)
  • Interesting. I got the same error Warning: Invalid argument supplied for foreach() in /***/***/public_html/wp-content/plugins/wp-smushit/bulk.php on line 39, for some images.

    I’ve looked at your site and your posts definitely have different meta descriptions. Your tags and categories, on the other hand, use the same description as your homepage.

    If you want different meta descriptions for your tags and categories, either change the options in that plugin you’re using (I haven’t used it myself, so no idea if it can do that), or add meta descriptions to your header with is_tag() and is_category() conditions.

    For example:

    elseif ( is_tag() ) { echo trim ( strip_tags( tag_description() ) ); }

    (Provided you have actually entered a description for every tag).

    Or, you could just leave meta description for tags and categories empty and let Google handle it. No big deal.

    Thread Starter chadrew

    (@chadrew)

    I’ve looked at other plugins which might clear Super Cache, and found out that I have to “tell” it that super cache is enabled with $GLOBALS["super_cache_enabled"]=1;. So this works:

    if (function_exists ('wp_cache_post_change')) {
    $GLOBALS["super_cache_enabled"]=1;
    wp_cache_post_change($post_id);
    }
    Thread Starter chadrew

    (@chadrew)

    I think I got something from looking at the debug logs.

    If admin visits the post and “Don’t cache pages for known users” is not checked, only WP-Cache file is created (no supercache).

    If anonymous user visits the post, only supercache file is created (no wp-cache).

    wp_cache_post_change($post_id); actually seems to clear only wp-cache (not supercache). I’m saying this because nothing happens when I vote as anonymous user – unless admin has visited the post (and created wp-cache as a result) before.

    So if I visit the said post as an admin (with “Don’t cache pages for known users” not checked), a WP-Cache file is created; then I visit as an anonymous user and vote, and wp-cache is cleared as it should!

    11:59:49 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=20&rate=5 Post change: deleting post cache files for test.mydomain.com/20/a-really-awesome-post: /home/myuser/public_html/test/wp-content/cache/wp-cache-a812edcce01ae89bc087f591d4ab1705.html
    11:59:51 /20/a-really-awesome-post supercache dir: /home/myuser/public_html/test/wp-content/cache/supercache/test.mydomain.com/20/a-really-awesome-post/
    11:59:51 /20/a-really-awesome-post Served page from supercache file using PHP.

    However, an old supercache file is still served even after wp_cache_post_change($post_id); was used, so anonymous user still sees old results after refreshing the page.

    Thread Starter chadrew

    (@chadrew)

    Great tip. I don’t know what to make of the results though. It seems cache only clears when I vote as a logged-in user.

    What happens in WPSC when I vote as anonymous user:

    10:53:14 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=1&_= supercache dir: /home/myuser/public_html/test/wp-content/cache/supercache/test.mydomain.com/wp-content/plugins/wp-postratings/wp-postratings.php/
    10:53:14 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=1&_= No wp-cache file exists. Must generate a new one.
    10:53:14 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=1&_= In WP Cache Phase 2
    10:53:14 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=1&_= Setting up WordPress actions
    10:53:14 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=1&_= Supercache caching disabled. Only using wp-cache. Non empty GET request.
    10:53:14 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=1&_= URI rejected. Not Caching

    I reload the page afterwards – old stuff is shown.

    What happens when I vote as logged-in admin (“Don’t cache pages for known users” is unchecked):

    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= Cookie detected: wordpress_logged_in_1b64b8eaccd745a3c91c4a1dc1905612
    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= supercache dir: /home/myuser/public_html/test/wp-content/cache/supercache/test.mydomain.com/wp-content/plugins/wp-postratings/wp-postratings.php/
    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= Cookie detected: wordpress_logged_in_1b64b8eaccd745a3c91c4a1dc1905612
    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= No wp-cache file exists. Must generate a new one.
    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= Cookie detected: wordpress_logged_in_1b64b8eaccd745a3c91c4a1dc1905612
    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= In WP Cache Phase 2
    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= Setting up WordPress actions
    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= Supercache caching disabled. Only using wp-cache. Non empty GET request.
    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= URI rejected. Not Caching
    10:56:05 /wp-content/plugins/wp-postratings/wp-postratings.php?pid=9&rate=5&_= Post change: deleting post cache files for test.mydomain.com/9/another-game-review: /home/myuser/public_html/test/wp-content/cache/wp-cache-27074f6ef064dd48f2d0c47a769458f3.html

    The last line – cache is actually getting cleared as I wanted.

    (Using PHP mode)

    You have to find where this phpBay code is inserted in your theme and use mfunc kind of like this:

    <!--mfunc YOUR_PHP_CODE -->
    <?php YOUR_PHP_CODE_AGAIN ?>
    <!--/mfunc-->

    I’m trying this myself – I wonder if it’s a big performance hit switching from mod_rewrite to PHP caching with dynamic page elements?

    Forum: Fixing WordPress
    In reply to: Custom fields

    When editing a post, press Screen Options and tick “Custom Fields”.

    Try doing it in the HTML mode and do not switch to the Visual editor at all.

    I think the easiest way would be to create a new Page, and paste in the JavaScript into the content area.

    You can see it in the URL when mousing over the Edit link in the Media Library. I am not sure if there’s a better/easier way.

    Sounds like something you’d be better off doing with .htaccess.

    Exactly as you said, but you have to use the attachment ID of your photo.

    You could make new pages as you said, yes, and not link them from your homepage. People would still be able to visit them directly, if they know the exact URL.

    Keep in mind Google won’t discover those pages if they aren’t linked from anywhere.

    I’d advise against using user agents to serve different content to users and search engines. It’s called cloaking and can get you banned from Google:

    http://en.wikipedia.org/wiki/Cloaking

Viewing 15 replies - 46 through 60 (of 114 total)