Home › Forums › Pro Support › One more suggestion – post order
- This topic has 12 replies, 3 voices, and was last updated 4 years, 5 months ago by
Tom.
-
AuthorPosts
-
September 19, 2016 at 7:04 pm #788
Nikola
ParticipantAn option for changing post order or choosing featured post would be great. 🙂
September 19, 2016 at 11:16 pm #789Tom
KeymasterThere is an order option in the More Settings tab.
As for a featured post – that’s do-able in the Columns tab.
If you want to do it a little differently, you can create 2 lists.
First list would display your 1 latest post (featured).
Second list would display the rest of the posts, you’d just need to set the offset value to 1 in the More Settings tab.
Hope this helps 🙂
September 20, 2016 at 12:11 am #790Nikola
ParticipantYes, I understand, but for example for some kind of news portal – If I have important post that I want to be featured but it is published before some other (not so important) posts, moving it to the featured position would take some time and changes in the list settings.
That is why I think that some kind of “make it featured” option would be great for usind plugin in portal/news sites with a a lot of posts. 🙂 I suppose it would be not so simple, but it is just a suggestion. 🙂
September 20, 2016 at 10:51 pm #792Tom
KeymasterDefinitely an interesting idea 🙂
You could always make a list specifically for the featured item, and choose to display it by ID in the More Settings tab.
Then in the list showing the rest of the items, exclude that post by ID.
It’s an experiment, if it doesn’t work I’ll see if I can find a different way as I think what you’re trying to do is something a lot of people would want.
Thanks!
September 21, 2016 at 9:29 pm #793Nikola
ParticipantIt works perfect, with all settings in Pro version there is a lot of options for placing posts in the desired position . 🙂 I just saying that for some websites that publishing a lot of posts per day maybe a bit faster option would be more convenient. 🙂
September 21, 2016 at 10:45 pm #794Tom
KeymasterI agree – I’ll try to come up with something. Maybe tagging those posts as featured and displaying the featured area by tag?
September 26, 2016 at 7:44 pm #815Nikola
ParticipantHm, that would be nice. Sorry for late reply. 🙂
June 22, 2019 at 12:51 pm #10006Jamal
ParticipantHi Tom
Would be super helpful to be able to set a featured image of own choice. Makes an interesting layout when masonry also chosen.
Right now i can assign wpsp_featured_post to a post but how do i tell a specific list to look for a post with that custom field and chose it as our featured post?June 23, 2019 at 9:14 am #10017Tom
KeymasterIt’s likely possible with filters. Check out the second half of this answer: https://wordpress.stackexchange.com/a/242751
June 24, 2019 at 10:50 am #10029Jamal
ParticipantI’m unable to make it work Tom, please give some more guidance. I thought i can filter this https://github.com/tomusborne/wp-show-posts/blob/f515ebd2efde601f8de8e9c6d153d0fbcbc1906e/wp-show-posts.php#L383 what do you think? Thanks in advance
June 24, 2019 at 5:23 pm #10032Tom
KeymasterThose are the query args which don’t include the value for the featured image.
You need to filter the featured image directly, which is more complicated.
For example:
add_filter( 'post_thumbnail_html', function( $html, $post->ID, $post_thumbnail_id, $size, $attr ) { $custom_field = get_post_meta( get_the_ID(), 'your_custom_field', true ); if ( '' == $html && $custom_field ) { $html = '<img src="' . $custom_field . '" alt="" />'; } return $html; }, 10, 5 );
June 26, 2019 at 10:39 am #10061Jamal
ParticipantSorry Tom for being a pain but what i want to do is choose a featured post instead of making the latest post featured. Would that be doable? Thanks
June 27, 2019 at 4:37 pm #10082Tom
KeymasterAh, sorry – thought you said featured image.
The “featured post” feature simply takes the latest post and styles it differently. Maybe if you set a post to be “sticky”?
-
AuthorPosts
- You must be logged in to reply to this topic.