• Resolved Morklympious

    (@morklympious)


    Posting twice in the same day. FOR SHAME.

    I’m trying to tackle as much as I can, I haven’t yet found out an answer to my Author problem, but I’ve been looking at another issue.

    I want to be able to use a custom settings POD that has a relation to posts, and I basically want the editors of the site to be able to checkbox the 5 posts they want in the RoyalSlider that appears on the homepage from a Pod in the WP interface.

    The only problem is, I don’t think I know (nor have I been able to find anything out about) pulling info from posts that have a relationship to a pod in a custom settings form.

    So I have the form setup, and it lists all of the published posts. but now I would like to find out how to pull that information from the pod.
    As my use of

    $mypod = pods(‘royal_slider_articles’, $params);

    fetch has somehow yielded an infinite loop, even though the limit is finite. Is there somewhere I should be looking for pulling post data from a pod list of posts?

    http://wordpress.org/extend/plugins/pods/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Morklympious

    (@morklympious)

    I guess my issue is that I have no idea what to look for with checkboxes. I understand I want to look for posts that are checked (probably through the use of looking for a boolean?), but I actually want to know is it POSSIBLE to obtain the post ID and subsequently the data associated based off of that custom settings Pod?

    Thread Starter Morklympious

    (@morklympious)

    To further explain, I’m trying to pull post data for the posts that are checkmarked:

    Screenshot of what I’m trying to pull info from.

    Plugin Contributor pglewis

    (@pglewis)

    I’m digging through my pile of to-dos and you’re on my list! Sorry for the delay, I’ll see what you have and see if I can help.

    Thread Starter Morklympious

    (@morklympious)

    No rush! I’m just glad someone got back to me!

    Any help you can give will be miraculous compared to the lack of things I’m finding with Google searches and Pods Docs!

    Thread Starter Morklympious

    (@morklympious)

    To shet some more light on this, within the custom settings page, I’ve made a field called ‘posts’

    I could call it something else, but this is a field in the custom settings page pod.

    I still can’t find any documentation on how to output just the posts that are checked, and whenever I run fetch on the custom settings page and have it output ‘hello’ under the while(fetch()) loop. but it just outputs ‘hello’ indefinitely, and php times out. 🙁

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    $related_posts = get_option( 'royal_slider_articles' ); // podname_fieldname

    That should return an array of IDs

    Thread Starter Morklympious

    (@morklympious)

    Okay. So it was get_option that I was looking for. I apologize for the ruckus I caused!

    I managed to get it working, NOW I understand that the syntax is podname_fieldnameinside pod, so I shouldn’t have this problem again.

    so since the pod name was royal_slider_articles and the field was posts, get_option(‘royal_slider_articles_posts’) returns the array you’re talking about.

    Thanks again, Scott.
    I’m appreciative that Pods plays so nicely with the WP-core.

    Thread Starter Morklympious

    (@morklympious)

    One more thing, I’m unable to get the custom settings form to appear for Editor roles on their WordPress UI.

    It would seem it only appears for administrators.
    And I’ve tried allowing editors through restrict access by role, but that didn’t change a thing.

    Is there some sort of core file I’m going to have to change to allow editors to view the Custom settings pod I’ve made?

    Thread Starter Morklympious

    (@morklympious)

    Nevermind! Found it.

    I had to enable roles and capabilities through settings in order to give the editor specific pods permissions.

    Thanks! 😀

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Pulling post information from a custom settings page’ is closed to new replies.