greencode
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Sort posts by custom field with numberOkay, this seems to work…
<?php $args = array( 'orderby' => 'meta_value', 'meta_key' => 'hm-slider-order', 'order' => 'ASC', 'meta_query' => array( array( 'key' => 'hm-featured', 'value' => 'true', 'compare' => 'LIKE' ) ) ); query_posts($args); ?>Forum: Plugins
In reply to: [Magic Fields] WordPress Settings Menu DisappearsI have it whereby my Pages Admin panel has vanished! I’m a little too scared to deactivate magic fields in case any of my settings are lost. I have to access the Pages by going into the Dashboard but the menu item for Pages in the left menu is no longer visible.
Forum: Plugins
In reply to: [Mingle Forum] Official Site DownOkay, fine so is this what you’re currently using and do you find it better than Mingle?
Forum: Plugins
In reply to: [Mingle Forum] Official Site DownI don’t understand why you’ve just added a link to another forum plugin without expanding as to why you’ve added it?!
Forum: Plugins
In reply to: [Mingle Forum] Official Site DownUrm, care to expand??
Forum: Fixing WordPress
In reply to: Pre 1970 datesNow then I’ve looked around and found this post http://wordpress.org/support/topic/pre-1970-dates-no-longer-handled-correctly?replies=12 which says to comment out this code in the wp-includes/functions.php file:
if ( false === $i || intval($i) < 0 ) { if ( ! $gmt ) $i = current_time( 'timestamp' ); else $i = time(); // we should not let date() interfere with our // specially computed timestamp $gmt = true; }which works perfectly and now dates are displaying as far back as I need i.e. 1932 but a couple of things:
1. Is it okay to do this i.e. will it affects anything else and…
2. Is there are a better way of doing this so when I update WordPress I don’t have to update that file each time?Forum: Fixing WordPress
In reply to: query_posts where custom field is trueSpot on. Thanks so much for all of your help – really appreciated. There was just a missing comma after ‘true’ but all’s working well now.
Forum: Fixing WordPress
In reply to: query_posts where custom field is trueI’ve used this code and it seems to be working okay but you say that meta_key is depreciated:
<?php query_posts( 'orderby=title&order=ASC&meta_key=featured&meta_value=true' ); ?>This then only shows posts where the custom field of “featured” has the content “true” entered in the field.
I would be grateful for any suggestions though.
Forum: Fixing WordPress
In reply to: query_posts where custom field is trueFigured out where the error was:
<?php $args = array( 'orderby' => 'title', 'order' => 'ASC', 'meta_query' => array( array ( 'key' => 'featured', 'value'=>'true' ) ) ); query_posts( '$args' ); ?>But that just seems to be bringing in any post where the “featured” custom field has content. Whereas I would like it where only posts with the text value of “true” are added.
Forum: Fixing WordPress
In reply to: query_posts where custom field is trueUmm, I got an error: Parse error: syntax error, unexpected ‘=’, expecting ‘)’
Forum: Fixing WordPress
In reply to: query_posts where custom field is trueThanks for this. How would I go about only showing posts where the value of that custom field was “true”? I’ve tried the following:
<?php $args = array( 'orderby' => 'title', 'order' => 'ASC', 'meta_query' => array('key' => 'featured', 'value'=>'true') ); ?> <?php query_posts( '$args' ); ?>But that doesn’t show anything.
Forum: Plugins
In reply to: [Mingle Forum] Display latest forum post?Hi cartpauj. Not sure why your posts keep disappearing but if you see this could you guide me – roughly – to what line number the activity thread is on. Thanks.
Forum: Plugins
In reply to: [Mingle Forum] Display latest forum post?Anyone?
Forum: Fixing WordPress
In reply to: External Javascript not workingThanks so much to both of you. I just added a checker script and managed to find the problem. It was a function that I’d included that decided to break everything else! Good idea though to add a very simple script and make sure that’s working fully in order to check more complex scripts.
Forum: Fixing WordPress
In reply to: External Javascript not workingHi. Thanks for your help. What do you mean about adding an alert to the first function?