chadrew
Forum Replies Created
-
Thanks a lot, mitcho ??
On an unrelated note, I solved the trouble with my custom template by adding
global $post;
to it. I’m not sure why that’s needed since the template seems to have its own loop, but I’m not a programmer so I can’t say ??@mitcho that seems to happen whenever I call
<?php related_posts(); ?>
manually, regardless if with custom template or not. I guess this problem is not related to custom templates after all.“Automatically display related posts”: everything’s fine (even when using the default custom template).
Widget: everything’s fine, likewise.
Place
<?php related_posts(); ?>
manually: the problem of same post appearing as described above.Hello folks,
I just upgraded to 3.4 and ran into some problems with custom templates that sound similar to yours. “Automatic display” and widget seem to be working fine, if I’m not using a custom template.First of all, my custom template which worked perfectly with all previous versions is no longer working (at all):
Second, I tried using the default yarpp-template-list.php bundled with YARPP 3.4, and with 20 related posts it returned the same two posts, over and over again (or to be more precise, 19 times one post, and 1 time another post, on every page).
Forum: Fixing WordPress
In reply to: Change Text Widget Content Through Custom FieldsJust put the code I gave you in your sidebar.php file (somewhere under all the widgets, I guess). And don’t forget to replace NAME with the actual name of the custom field. I just tried it and it worked for me.
I am pretty sure WP Super Cache already clears the homepage when a new post is made.
Forum: Fixing WordPress
In reply to: Change Text Widget Content Through Custom FieldsSomething like this I guess (where NAME is the name of the custom field):
<?php if (is_single() && get_post_meta($post->ID, 'NAME', true)) { echo get_post_meta($post->ID, 'NAME', true); } ?>
Do you mean the sidebar widget, or the automatically inserted related posts? If it’s the latter, you can uncheck “Automatically display related posts” in YARPP options, and then insert related_posts() manually in your “normal” post template, but not your custom post templates.
Forum: Plugins
In reply to: [Cloudflare] CloudFlare and WP Super Cache CDN Settings?For optimizing images you could try smushit.com (there’s a WordPress plugin for that, too).
CloudFlare has a lot of features like minifying HTML, CSS, and JS that you can turn on in “Cloudflare Settings” section for your website. Although, since it’s all done on-the-fly, I’m not sure if the added processing time is worth the slightly reduced file size and the resulting faster transfer.
Forum: Plugins
In reply to: Random Posts WidgetThis probably belongs to https://en.forums.wordpress.com/
Try the FAQ, it explains how to display highest rated post(s) using
get_highest_rated()
Forum: Fixing WordPress
In reply to: Performance Issue with Large Number of Pages (2000 )Great news… As someone who uses %postname% permalinks, I’m looking forward to this ??
Forum: Fixing WordPress
In reply to: Query_post – dateSPECIAL NOTE: When there are multiple posts on a page published under the SAME DAY, the_date() only displays the date for the first post (that is, the first instance of the_date()). To repeat the date for posts published under the same day, you should use the Template Tag the_time() or get_the_date() (since 3.0) with a date-specific format string.
Forum: Fixing WordPress
In reply to: Custom field after Title in RSS feed?What did you try that didn’t work? Did you try
the_title_rss
hook?I’m probably late, but you could use YARPP custom templates feature, and simply filter out the pages and leave only posts.
I do something similar, since my posts are about upcoming events and I want only future events to be shown (not the ones which have ended already) so I filter them out by custom fields.
One problem with this approach is that if you have YARPP set to show 3 related posts, and the related entries are like this:
1. page
2. post
3. pageOnly 1 post will be shown. I’ve had to increase YARPP related post number to 20 or so (since most of them will be filtered in the custom template).