Josh
Forum Replies Created
-
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Displaying a page's custom fieldsI found an alternative solution to this.
I created a relationship pod that will allow my customer to toggle a feature on for any pages of their choosing, this allows them to manage which pages are receiving a specific feature much easier than my original attempted method.
Example Code:
<ul class="featuredWrapper"> <?php $pageID = get_the_id(); $params = array( 'where'=>"display.ID = $pageID", 'limit'=>1); $features = pods( 'feature', $params ); ?> <li class="featuredBox featured1"> <?php while ( $features->fetch() ) : ?> <div class="text"><?php echo $features->display( 'post_title' ); ?></div> <?php echo $features->display( 'post_content' ); ?> <?php endwhile ?> </li> </ul>
Thanks for the help.
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Displaying a page's custom fieldsI have this feature on hold for the moment, I’ll update when I get back around to trying to figure it out.
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Displaying a page's custom fieldsupdate, using Scott’s method of declaring my $page value instead of the $params causes my page id to echo out at 1 on all pages.
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Displaying a page's custom fieldsAfter reading through the docs a bit more I still haven’t been able to figure this problem out since the only experience I have with pods is for looping through items and not trying to display the particular page’s item.
Scott, for some reason my page ids aren’t lining up correcting with the pod extensions. when I call the page id and just echo it out it displays a different number than the one I have to use in the array. for example the page id of the page I’m testing with is 7 but 21 is the number I have to put in to display that particular page’s items (as seen below).
<?php $page = $page_array[21]; ?>
P.S. Josh I actually only signed up for the forums about 5 minutes prior to this post so I guess I just lucked out on the screen name (assuming you’re referring to the JoshDev name)