andrewharvey
Forum Replies Created
-
Forum: Plugins
In reply to: How to disable Yoast SEO adding article:author meta tags to pagesI suspect this will do the trick, I’m just not sure what should replace xxxx
function wpseo_show_article_author_only_on_posts() { if ( !is_single() ) { return false; } } add_filter( 'xxxxx', 'wpseo_show_article_author_only_on_posts' );
Forum: Plugins
In reply to: [Plugin: Simple Facebook Connect] post to FB timeline & specify dateThanks Otto, that’s what I feared.
For anyone else facing this, I ended up adding the WP posts to by FB page manually, and setting the date for each one. Long winded, but the only way I could find!
Forum: Themes and Templates
In reply to: Hooks and multiple loopsHi Scott, thanks for pointing me towards some useful guides. I particularly like your example query. I had been trying to figure out how to add a date filter to my featured loops.
Many thanks!
Forum: Themes and Templates
In reply to: Hooks and multiple loopsOn a related note, I’d still love to know if there is a more efficient way to build the posts in my loop.
The div=”id” code above is copied directly from the archive.php file in thematic.
As this code already exists in the theme, is there a simple way to call it without needing to duplicate it?
Hmmm, still trying to get to understand all this!!
Forum: Themes and Templates
In reply to: Hooks and multiple loopsOK, after scratching my head some more, I’ve come up with the following solutions. If anyone can offer advice or ideas to improve this, I would be very grateful.
1. I used the remove_action to remove the default loop, and then called my new childtheme_catloop function. But I had made a mistake in my remove_action syntax, and this was causing my headaches. The correct code is below, note the underscore in thematic_category_loop (I don’t yet understand why this works, so if anyone can point me to an explanation?…).
function remove_categoryloop() { remove_action('thematic_categoryloop','thematic_category_loop'); } add_action('init', 'remove_categoryloop')
2. My problem here was confusion between WordPress hooks and Thematic hooks. So to recreate the posts in the loop, I replaced <!– the loop –> above with these hooks:
thematic_postheader();
thematic_content();
thematic_postfooter();My full code (replacing <!– the loop –> above) is:
while ($feat_query->have_posts()) : $feat_query->the_post(); ?> <div id="post-<?php the_ID(); echo '" '; if (!(THEMATIC_COMPATIBLE_POST_CLASS)) { post_class(); echo '>'; } else { echo 'class="'; thematic_post_class(); echo '">'; } thematic_postheader(); ?> <div class="entry-content"> <?php thematic_content(); ?> </div><!-- .entry-content --> <?php thematic_postfooter(); ?> </div><!-- #post --> <?php endwhile;
Anyway, I hope this can be useful to someone else, and save them the many hours of head scratching that it’s taken me to get to grips with this simple problem!
Thanks
Forum: Hacks
In reply to: Custom Posts, Meta Boxes, and RelationshipsBUMP!
Has anyone used custom select fields populated with post titles to construct relationships between custom post types? i.e. approximating a relational database?
I’m be really interested to hear about your experiences, and any issues you may have encounter as the number of posts expanded.
Thanks