Forum Replies Created
-
AuthorPosts
-
jcristMemberYou could store the choices as a variable, add “All Categories” with a value of -1, then use ksort:
$choices = piklist( get_terms('category', array( 'hide_empty' => false )) ,array( 'term_id' ,'name' )); $choices[-1] = 'All Categories'; ksort($choices);Then references $choices as the…choices
jcristMemberThis might be a bit specific for my use but I was thinking that the related-posts could be ordered on a page-by-page basis. For example, on the attorney/aop instance above, Attorney1 wants AOP2 to display first while Attorney2 wants AOP1 first.
Kind of like what ACF does with their relationship field, but keeping it inside a taxonomy box and keeping it (mostly) the wordpress way. This would require the order to be saved in either post_meta or somewhere else right? I suggested an additional column so you wouldn’t have to query the postmeta just to get the order.
jcristMemberWhile the solution did work just fine, it feels a little cumbersome. I saw a post somewhere that said you are rethinking the post-relate, any insight on that?
I have an idea, and I’m sure you’ve have one similar but I’ll throw it out there anyway — allow users to sort related-posts inside of the meta-box like http://jsfiddle.net/PtskU/ so the order is customizable on a post-by-post basis. I figure that since there’s a new table in the DB for post-relationships, you could add something like the menu_order column in wp_posts.
jcristMemberBingo, thanks Steve.
jcristMemberCorrect, user should be able to see the field but it is disabled.
Not a big deal as I ended up hiding the field for non-admins but still seems strange that the value disappears.
jcristMember
jcristMemberThanks for the tip, Steve. This should work just fine for one-way relationships but say I also wanted to display the lawyers on the AOP page?
December 5, 2014 at 9:46 am in reply to: Removing attachment causes it to jump right back after update #2967
jcristMemberI and some others were having this issue as well — https://piklist.com/support/topic/cant-remove-file-with-the-file-field/
Great to see a patch, hope to see it in the next update!
jcristMemberThis is still an issue, correct? We are unable to remove PDF files after selecting in a file_upload meta-box.
jcristMemberJust curious if this is planned?
jcristMemberJust found this thread — https://piklist.com/support/topic/conditions-in-add-more-groups/ so we use it as a template for our fields and see how it goes.
jcristMemberThanks for the reply Jason. After some consideration I’ve decided that it would be best not to use something like flexible content for the framework I plan on creating 🙂
-
AuthorPosts