Home Forums Pure Theme Discussion & Support 'Stick' a post to home

This topic is: not a support question

This topic contains 18 replies, has 3 voices, and was last updated by  themeweaver 7 years ago.

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #3525

    themeweaver
    Keymaster
    Post count: 730

    OK, but you have a widget in second homepage area which replaces the content produced by the template?

    #3535

    kam onn siew
    Participant
    Post count: 12

    I took out the widget and it does display the sticky posts.
    Great.
    Can you tell me where the Show Post Widget code is ?
    I prefer the Post Widget’s “Show teasers/list of posts with thumbs”.
    Would like to study the code to see whether I can include sticky posts within the widget.

    #3536

    kam onn siew
    Participant
    Post count: 12

    Hi, I found show-widgets.php and post.php’s get_posts.

    Seems that get_posts always ignore_sticky_posts.

    I am wondering whether in los_showPosts,

    $los_posts = get_posts($get_posts_args);

    would be better replaced with :

    $get_posts = new WP_Query;
    $los_posts = $get_posts->query($get_posts_args);

    ?

    #3537

    themeweaver
    Keymaster
    Post count: 730

    Possibly, but right now it uses get_posts, which is a simpler way of retrieving posts. And unfortunately doesn’t support sticky posts.

    We’ll try and review this next time we are updating the widgets.

    But there are other considerations. Other uses of this widget want sticky posts ignored, so it implies there will need to be more configuration options. We are always reluctant to add more options to these widgets because we want things kept simple. There are other plugins that allow you query posts more comprehensively.

Viewing 4 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic.