Black Friday sale! Get 25% off WPSP Pro! Discount automatically applied at checkout.

[Support request] One more suggestion – post order

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support One more suggestion – post order

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #788
    Nikola
    Participant

    An option for changing post order or choosing featured post would be great. 🙂

    #789
    Tom
    Keymaster

    There 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 🙂

    #790
    Nikola
    Participant

    Yes, 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. 🙂

    • This reply was modified 4 years, 2 months ago by Nikola.
    #792
    Tom
    Keymaster

    Definitely 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!

    #793
    Nikola
    Participant

    It 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. 🙂

    #794
    Tom
    Keymaster

    I agree – I’ll try to come up with something. Maybe tagging those posts as featured and displaying the featured area by tag?

    #815
    Nikola
    Participant

    Hm, that would be nice. Sorry for late reply. 🙂

    #10006
    Jamal
    Participant

    Hi 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?

    #10017
    Tom
    Keymaster

    It’s likely possible with filters. Check out the second half of this answer: https://wordpress.stackexchange.com/a/242751

    #10029
    Jamal
    Participant

    I’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

    #10032
    Tom
    Keymaster

    Those 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 );
    #10061
    Jamal
    Participant

    Sorry 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

    #10082
    Tom
    Keymaster

    Ah, 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”?

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.