theamazingaustin
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Creating a loop that displays custom post type with matching field?Would this question be more appropriate for the ‘hacks’ forum?
I guess there is no way for me to remove or relocate this topic…?Forum: Plugins
In reply to: [Nemus Slider] Embed in PHP TemplateMuch thanks Passatgt!!!
After hours of time, I’ve figured out issues, and the code is below.
The line:
'meta_key' => types_render_field("date", array("output"=>"raw"))'
Is not valid, and the Types plugin variable must be used in this way:
'meta_key' => 'wpcf-date',
Wow. That was simple.
Forum: Fixing WordPress
In reply to: Orderby => meta_value Not WorkingAfter hours of time, I’ve figured out issues, and the code is below.
The line:
'meta_key' => types_render_field("date", array("output"=>"raw"))'
Is not valid, and the Types plugin variable must be used in this way:
'meta_key' => 'wpcf-date',
Wow. That was simple.
Here’s a complete summary of my code, I’m really stumped and hoping someone might have a word of advice. There is no sorting at all happening when I use this, but orderby => using worpress variables (ex: title, date, etc) works just fine…
Thank you in advanced for your time!!! ??<?php // Set arguments for the query in a php array. $args = array( 'posts_per_page' => 100, 'post_type' => 'workshop-date', 'meta_key' => types_render_field("date", array("output"=>"raw")), 'orderby' => 'meta_value', 'order' => 'ASC'); $query = new wp_query( $args ); //While you still have posts (haven't displayed the last one) - then display it! if ( $query -> have_posts() ) : while ( $query -> have_posts() ) : $query -> the_post(); ?> //HTML Output of posts here <?php endwhile; else: ?> <p>There are no dates to display.</p> <?php endif; ?>
Thanks for your help Marcin,
I’ve tried it this way as well, but reverted to test it out a second time. Here is my code now, still no luck. Is this the correct way to implement the Types custom field into an argument?
Thanks!
-Austin$args = array( 'posts_per_page' => 100, 'post_type' => 'workshop-date', 'meta_key' => types_render_field("date", array("output"=>"raw")), 'orderby' => 'meta_value', 'order' => 'ASC');
So I’ve noticed after adding several dates to the “workshop-date” custom post type, the dates are not displayed in order. They are not in their default order, but they are all jumbled up, more or less going from most recent / upcoming to further in the future, but the dates are pretty sporadic.
see here: https://www.directdevelopmenttraining.com/workshops/workshop-dates/Perhaps the “Types” plugin isn’t a suitable mean of sorting? I’ve tried everything I can think of to get it to work… I don’t understand why random dates appear out of order.
Beautiful, thank you so much!
[Resolved]
Thanks for your help, and I’ll check out that link as well.
Adding the wp_head and removing my own jQuery call did the trick.Much appreciated!
Forum: Fixing WordPress
In reply to: Repeating error on main page: open_basedir restriction in effect.Can you tell if it is an issue on the server where the site is being hosted (Directdevelopmenttraining.com) or the server that is being mentioned in the error (ddt.craftwerks.com)?
Thanks!!!