Forum Replies Created
-
AuthorPosts
-
friendlyfire3Member“Everything about Piklist is done the WordPress way including retrieving data. You can use the native WordPress function get_post_meta to retrieve the attachment information.”
I get that (and really appreciate it!) However, I think i should rephrase that:
Can piklist add media to a post by updating the attachment’s parent field to be the id of the post we’re attaching it to?
For example, this is how I would do it if I was writing something custom:
wp_update_post( array( 'ID' => $attachment_id, 'post_parent' => $post_id ) );
friendlyfire3MemberOk, So there’s no way to use piklist to save attachments and use native wp methods to get those attachements?
Also, why does the piklist demo for uploading featured images say this:
Use this field to match WordPress featured image field name.
friendlyfire3MemberOne more update: I noticed that the following code:
get_post_meta( $post->ID, '_thumbnail_id', false );gets the ids of all the attachments. That’s great and all but I am trying to avoid custom post meta to pull them. I was anticipating using native wp functions like (get_posts etc) to get the attachments because I have a frontend page builder that uses those functions to grab attachments and I don’t really want to hack into it.
Let me know if this is possible.
friendlyfire3MemberUpdate: This works once I hid the featured media box: https://piklist.com/support/topic/hide-the-feature-image-default-box/
,'hide_meta_box' => array( /* here the Feature image div */ ,'postimagediv' )The images now appear correctly. However, now I have a new issue. I can’t get them via any wp method.
I’ve tried:
global $post; $attachments = get_posts( array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => 'any', 'post_parent' => $post->ID, 'exclude' => get_post_thumbnail_id(), ) );and
$attachments = get_children(array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID'));The only thing I can get is the the post thumbnail with:
get_post_thumbnail_id( $post->ID );It looks like piklist isn’t actually attaching these extra images to the custom post type or I’m missing something. Any advice is appreciated.
friendlyfire3MemberYes, it does. I tried it on another post type and I’m still having the same issue.
I did notice that the demo does away with the traditional featured media box. Would that need to be done in order for it to work?
I dug around the demo code to see how you removed it but I didn’t see anything specific. Let me know if you have any other ideas. As always, thanks for your help, Steve!
friendlyfire3MemberBtw, Running 0.11.4
friendlyfire3MemberI have this same issue (even with the beta). It’s been going on for a bit.
friendlyfire3MemberGiving this a shot, @Steve. Will report back. Should I use github or will the forum work for issues?
Edit: This fixed the issue when you’re using the top group. When you’re nesting groups within groups and start to add more, it gets slower. When is this going to a release?
friendlyfire3MemberIs there any solution to this?
Unfortunately, the way we are using the groups with addmores predicates them being grouped so we can’t separate them into multiple tabs/workflows.
Any suggestions on how to speed things up? I’m getting load times in the 5-6 minute range. Yikes!
friendlyfire3MemberI’m having this same issue. Unfortunately, the way we are using the groups with addmores predicates them being grouped so we can’t separate them into multiple tabs/workflows.
Any suggestions on how to speed things up? I’m getting load times in the 5-6 minute range. Yikes!
friendlyfire3MemberAwesome, Jason. What’s the branch name? I’ll definitely pull it and test for you.
friendlyfire3Memberfyi, I’ve tried post_has and post_belongs. All of them just return all the posts for the endpoint type.
friendlyfire3MemberI’m using composer. However, I didn’t see it in the wpackagist. Is it under dev-trunk?
friendlyfire3MemberYou know if this is being resolved soon or not? https://piklist.com/support/topic/nested-add_more-group-with-conditional/
friendlyfire3MemberPiklist has been incredible for building data structures via their grouped meta boxes, conditionals and addmores. We use the final product in our wp-based REST API without the bloat of a GUI. I also feel the lack of a gui makes it easier for the devs to release new needed features without one extra step they need to go through.
The forum replies is nothing short of impressive. Steve, Jason and team are incredibly helpful in working out issues considering it’s an open source product.
My only issue is that sometimes the docs lack robust examples but that’s really where the community should step in. If you guys did docs on github, I’d totally contribute.
-
AuthorPosts