andersj
Forum Replies Created
-
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Order by custom fieldHey @keraweb,
Full code here:
<?php
$params = array(
‘limit’ => -1,
‘where’ => ‘CAST (policy_order.meta_value AS INT) ASC’, // Just added this line but might be referencing wrong as I’m not familiar with CAST
‘order_by’ => ‘policy_order.meta_value ASC’
);$policies = pods( ‘policies’, $params );
while ( $policies->fetch() ) {
//I echo my output
}
?>Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] where clause in fetch paramsSolved it by adding a .meta_value after the field name!
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] where clause in fetch paramsHey @keraweb,
Same problem but I don’t need it in the use earlier provided. Now I’m trying to do this with a pod named faq:
$params = array( 'limit' => -1, 'orderby' => 'post_title ASC', 'where' => "faq_type = 'Default'" );faq_type is a custom relationship field (simple) with the options of Default and SPAN.
Thanks, Scott!
That did it, good to know about the display tag, will go look at that documentation.
I’m doing this to set up a custom archive.php page.
Hi @keraweb,
Thanks for your response. I did enable auto templates.
Unfortunately, it produces archive pages for both where it pulls out the title at /timeline and /news but it’s the system default. It’s not looking at my archive-news.php or archive-timeline.php.
-Justin
Forum: Fixing WordPress
In reply to: Custom post type archive file not working@sc0ttkclark news_story
I did also try archive-news_story.php with no luck.