Support

Account

Forum Replies Created

  • Alright now we’re talking…thanks again, @gummiforweb! That solved my issue 🙂

  • Thanks, @gummiforweb; here’s the var_dump:
    object(WP_Post)#3438 (24) { ["ID"]=> int(96) ["post_author"]=> string(1) "4" ["post_date"]=> string(19) "2017-10-18 19:44:55" ["post_date_gmt"]=> string(19) "2017-10-18 19:44:55" ["post_content"]=> string(0) "" ["post_title"]=> string(20) "Announcement Pending" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(6) "closed" ["ping_status"]=> string(6) "closed" ["post_password"]=> string(0) "" ["post_name"]=> string(10) "pendingtba" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2017-10-18 19:45:44" ["post_modified_gmt"]=> string(19) "2017-10-18 19:45:44" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(58) "http://mytestingdomain.com/?post_type=location&p=96" ["menu_order"]=> int(0) ["post_type"]=> string(8) "location" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }

    I see lots of stuff and honestly, I don’t really know what I’m looking for, but perhaps it’s no coincidence that the first thing in the list is the post number and id? That said, I do see the post title is showing correctly, so maybe instead of get_field I should try something that check’s the post title or ID?

    Actually that doesn’t make sense either, since I’m trying to use the post_object field on this post to figure out which related location post to pull info from. In other words, I can’t grab the post_title until I know which title I’m supposed to be looking for. Unless I’m missing something…Like I said before, I’m still pretty green with these PHP thingies so I certainly appreciate any help sorting through my mess here!

  • I realize my wording was a tad ambiguous there in that second to last paragraph. I didn’t switch the actual words if and else, just what’s supposed to happen under each condition (e.g. if field == 'Announcement Pending' show <p>TBA</p>, else that whole mess of stuff).

  • After a quick skim, I would say there’s at least a pretty good chance that will do what I need! Thanks, @hube2 for the tips and guidance!!

  • Here’s another variable I neglected to explain: I’m hoping to keep all this in the back end. So workflow is basically like this:

    1) Create new post under CPT
    2) Fill out lots of basic fields and a few conditionals
    3) One of those conditional fields unlocks the option to add location details, which is where the fields in question pop up.

    So from the post creation page of CPT1, I’d like to be able to pull data and/or create a new post under a different CPT. Does that make sense?

    I’m sure there’s a distinct possibility that your suggestions cover me and this is all just gonna go over my head so I appreciate your patience and assistance!

    Ultimately we can make it work without that post creation step, but it sure would be nice!

Viewing 5 posts - 1 through 5 (of 5 total)