Duncan
Forum Replies Created
-
Thanks very much, v1.1 works perfectly. Great plugin by the way! 🙂
Forum: Fixing WordPress
In reply to: Issue with $term->name when Taxonomy term contains spacesAh, I’ve just found a fix. Getting the term by slug rather than by name seems to work ok.
<?php $taxonomy = 'brand'; $cat_name = get_query_var( $taxonomy ); $term = get_term_by('slug', $cat_name, $taxonomy); echo '<h1> All products from ' . $term->name . '</h1>'; ?>Forum: Fixing WordPress
In reply to: Issue with $term->name when Taxonomy term contains spacesHi. Thanks for taking the time to reply.
Yes, “brand” is definitely in the _term_taxonomy database table under the taxonomy heading. The term_id’s that reference ‘brand’ are all set out ok in the _terms table as well.
Forum: Installing WordPress
In reply to: Fatal Error on Upgrade, Allowed memory size exhausted?Yeah, I had the same issue with identical figures:
Allowed memory size 33554432 bytes
tried to allocate 2966269 bytesI added the memory definition to wp-config.php define(‘WP_MEMORY_LIMIT’, ‘256M’ );
Which still didn’t work. Then I deactivated ALL plugins and wordpress upgraded to 3.0.1 without any problems. After that all the plugins activated ok.
Done! Hope that helps 🙂
Forum: Fixing WordPress
In reply to: How to change “Pages” title_li when using wp_list_pages?Brilliant, thanks a lot Cais 🙂
Forum: Fixing WordPress
In reply to: include pages when meta_value = page title?Finally sorted. It needed to be get_the_title rather than just the_title…
<?php $this_page_title = get_the_title(); global $post; $args=array( 'post_type' => 'page', 'meta_key' => 'Project Group', 'meta_compare' => '=', 'meta_value' => $this_page_title ); $pages = get_posts($args); if ($pages) { $pageids = array(); foreach ($pages as $page) { $pageids[]= $page->ID; } ?> <ul> <?php wp_list_pages('include='.implode(",", $pageids)); ?> </ul> <?php } ?>Hope that helps someone else in the future.
Forum: Fixing WordPress
In reply to: include pages when meta_value = page title?Thanks for the reply esmi but I’m afraid that still doesn’t work 🙁
$this_page_title = the_title(); @args=array( 'post_type' => 'page', 'meta_key' => 'Project Group', 'meta_value' => $this_page_title );Forum: Fixing WordPress
In reply to: Premalink issue with single.php pageThanks for replying James. My problem is now completely sorted (I migrated all my websites from Fasthosts). I just got a bit sick of the hassles.
Forum: Fixing WordPress
In reply to: exclude from wp_list_pages with meta_valueThanks MichaelH, this code is pretty much what I’ve been looking for. However, I need to include pages that have a custom field value equal to the page title.
I’ve used this code, but it doesn’t work properly – please can someone help?
<?php global $post; $args=array( 'post_type' => 'page', 'meta_key' => 'Project Group', 'meta_compare' => '!=', 'meta_value' => '<?php the_title(); ?>' ); $pages = get_posts($args); if ($pages) { $pageids = array(); foreach ($pages as $page) { $pageids[]= $page->ID; } ?> <ul> <?php wp_list_pages('include='.implode(",", $pageids)); ?> </ul> <?php } ?>Forum: Fixing WordPress
In reply to: Premalink issue with single.php pageSorted. I’d missed the trailing ‘/’ off the permalink structure 🙂