- This topic has 9 replies, 2 voices, and was last updated 7 years, 1 month ago by
dawood.
-
AuthorPosts
-
-
December 13, 2014 at 6:38 pm #3082
dawoodMemberFor a page, I’d like to be able to add an option for the user to select INDIVIDUAL posts Then, I’d like to be able to render those out, is that possible?
The closest concept I’ve found is this Field, https://piklist.com/user-guide/docs/fields/post-post-relationships/
In this case, the user selects the posts from the list and ONLY those are rendered out, right now it looks as though, we’d be able to only render posts RELATED to those.
-
December 13, 2014 at 8:45 pm #3083
dawoodMemberpiklist('field', array( 'type' => 'select' ,'field' => 'dawood' ,'columns' => 12 ,'attributes' => array( 'multiple' => 'multiple' ) ,'choices' => piklist( get_posts( array( 'post_type' => 'post' ,'orderby' => 'post_date' ) ,'objects' ) ,array( 'ID' ,'post_title' ) ) )); ?>`// Gets the 3 Featured boxes
$dawood=get_post_meta($post->ID, ‘dawood’, false);
piklist(get_stylesheet_directory() . ‘/inc/dawood’, array(‘data’ => $dawood, ‘loop’ => ‘data’));
`<?php echo $data; ?>The problem is that I only get the ID numbers and am trying to get the Post_title with the Permalink?
-
December 14, 2014 at 7:36 pm #3089
SteveKeymaster@dawood– You can’t get the full permalink directly. Take the ID and use get_permalink().
-
December 14, 2014 at 11:47 pm #3090
dawoodMemberThanks Steve, I got stuck trying to pass the ID variables into the function. I figured since the ID’s were what’s being output I could assign those a variable and then place that inside the get_permalink but it did not work…
-
December 15, 2014 at 10:45 am #3098
-
December 17, 2014 at 5:30 pm #3118
dawoodMemberThis reply has been marked as private.
-
-
AuthorPosts
- The topic ‘Select Box For Displaying Posts’ is closed to new replies.