Jem Turner
Forum Replies Created
-
The ‘ and ] are the wrong way round; try:
<?php echo do_shortcode('[ajax_load_more]'); ?>Forum: Plugins
In reply to: [Fix Category Count] Getting Parse Error – Unexpected EOFHaving the same problem, WP4.6
Forum: Hacks
In reply to: querying and displaying post meta data multidementional arrayget_post_meta unserialises the data for you – you don’t need to directly query the database (and you’re misusing wpdb->prepare)
Forum: Hacks
In reply to: querying and displaying post meta data multidementional arrayThe example code you’re using from the get_post_meta page should be used inside a loop (foreach, while, for etc are typically used for this); because you’re pulling an array out with get_post_meta, if you try and echo that without a loop all you would typically see is ‘Array’.
Try something like:
$hours = get_post_meta( get_the_ID(), '_wppl_days_hours', true); foreach( $hours as $opening ) { echo $opening['days'] .': '. $opening['hours'] .'<br>'; }This should pull your multidimensional array into $hours. We can then loop over $hours, assigning each inner array to $opening where we can then access the day and hours by their named key.
(Untested.)
Forum: Installing WordPress
In reply to: So far 2.7 is one giant huge headache.Count me in as another with one big headache.
Did the upgrade last night, found several fatal errors in the admin panel but didn’t have the time or patience to look at it, so went to bed. This morning, I realise the true extent of the problem… fatal errors rending 90% of the admin panel unusable.
So, I take a database back-up, delete everything and do another upgrade. Fixes the fatal errors, but now commenting doesn’t work. Or rather, people can try and post a comment and it *occasionally* goes through but 9 times out of 10 gives a 404 and sends me this blank email:
A new comment on the post # “” is waiting for your approval
Author : (IP: , )
E-mail :
URL :
Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=
Comment:Approve it: http://www.jemjabella.co.uk/wp-admin/comment.php?action=mac&c=0
Delete it: http://www.jemjabella.co.uk/wp-admin/comment.php?action=cdc&c=0
Spam it: http://www.jemjabella.co.uk/wp-admin/comment.php?action=cdc&dt=spam&c=0
Currently 0 comments are waiting for approval. Please visit the moderation panel:
http://www.jemjabella.co.uk/wp-admin/edit-comments.php?comment_status=moderatedI wish I’d stuck with the last version. You can see the full extent of my problems at jemjabella.co.uk, although I warn you in advance that there is profanity.
Forum: Fixing WordPress
In reply to: the_content and next_posts_link did not work with query_postsI was having a similar problem – I am using query_posts() to display all but one category on my main page, and this was causing my next_posts_link() and previous_posts_link() functions to break.
The solution posted here fixed the problem:
http://ww.wp.xz.cn/support/topic/57912#post-312858Note however that my $paged/query_posts() is BEFORE the “if (have_posts()) :” line.
(I am running 2.5)
Forum: Fixing WordPress
In reply to: Pages to be edited by all usersThanks. The user_levels page tells me other users can only only manage pages created by themselves or those with a lower level. Because I’m admin (therefore 10).. they can’t edit them. I guess I can just create a ‘spare’ account with a lower user level to add the pages.
Thanks btw. 🙂 I did check the codex – obviously missed those pages. D’oh!