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 3 years, 11 months ago.

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #3486

    kam onn siew
    Participant
    Post count: 12

    How do I ‘stick’ a post to the Home page ie make it display constantly on the Home page ?

    #3487

    themeweaver
    Keymaster
    Post count: 730

    Do you mean using the show posts widget? This widget doesn’t currently stick sticky posts to front.

    There are other plugins around like http://wordpress.org/extend/plugins/query-posts/ which give full control of the query.

    However, the blog page template supports sticky posts putting them at the top, but you would need to make a page with the blog page template your home page, loosing the other features like slider etc.

    Or you could use the index.php and create a new page template that uses the code from the blog template in the space on the homepage where you want the sticky posts. In fact I could do that for you if you let me know where you want the sticky posts.

    #3488

    kam onn siew
    Participant
    Post count: 12

    Best option: ” using the show posts widget” with option to include ‘sticky’ posts

    Better option:
    “Or you could use the index.php and create a new page template that uses the code from the blog template in the space on the homepage where you want the sticky posts. In fact I could do that for you if you let me know where you want the sticky posts.”

    Order by publish time until it reaches the bottom of the home page where they stay (never gets aged out of home page).;

    #3489

    themeweaver
    Keymaster
    Post count: 730

    “Order by publish time until it reaches the bottom of the home page where they stay (never gets aged out of home page)” – not sure what that means.

    If you want a list of posts inside inside one of the widget areas on the default homepage, please indicate which homepage area you want this. But “until reaches bottom” – impossible! – you define number of posts to show and the first posts will be whatever sticky posts you have.

    #3490

    kam onn siew
    Participant
    Post count: 12

    “If you want a list of posts inside inside one of the widget areas on the default homepage, please indicate which homepage area you want this”
    Second Homepage Area

    “you define number of posts to show and the first posts will be whatever sticky posts you have.”
    This will work for me.

    #3502

    themeweaver
    Keymaster
    Post count: 730

    You can download a custom page template to use with Pure here:

    download

    Unzip and place file in your Pure theme’s folder.

    This will show sticky posts in homepage area 2. Create a new page, select the new page template and make your home page static = new page.

    You can add custom fields to your page posts_per_page and category_name to configure display.

    Or you can edit the page template itself and produce whatever query you need.

    #3503

    kam onn siew
    Participant
    Post count: 12

    It’s not working.

    I thought it was because
    $args = array(
    ‘posts_per_page’ => $posts_per_page,
    ‘post__in’ => get_option( ‘sticky_posts’ ),
    ‘ignore_sticky_posts’ => 1,
    ‘category_name’ => $blog_cat
    );

    I amended

    ‘ignore_sticky_posts’ => 1, to
    ‘ignore_sticky_posts’ => 0,

    and it still does not work.

    For example, http://standrewschurch.org.my/2012/09/28/adult-chancel-choir-2/ is a sticky post and it’s not showing up on http://standrewschurch.org.my/

    #3506

    themeweaver
    Keymaster
    Post count: 730

    But your home page is still showing the default index page. You now need to set a the static page option in WordPress to point to your new page using the custom home page template.

    To adjust query parameters you can view here:
    http://codex.wordpress.org/Class_Reference/WP_Query

    #3511

    kam onn siew
    Participant
    Post count: 12

    “need to set a the static page option in WordPress to point to your new page using the custom home page template”

    Maybe I am missing some steps.
    This is what I did:
    1. created a page with Template : Custom Home Page
    2. set this as the static front page at : http://standrewschurch.org.my/wp-admin/customize.php

    #3513

    themeweaver
    Keymaster
    Post count: 730

    Step 1 is correct
    Step 2 – I don’t think you mean that url? If you did it is incorrect. This must be the page you created in step 1.

    #3518

    kam onn siew
    Participant
    Post count: 12

    “need to set a the static page option in WordPress to point to your new page using the custom home page template”

    This is what I did:
    1. created a page with Template : Custom Home Page

    2. At wp-admin/customize.php, under Static Front Page:
    I chose
    Front Page displays – a static page
    Front Page – the page from Step (1)

    Using view-source:http://standrewschurch.org.my in Google Chrome, I got this excerpt from Home Page (www.standrewschurch.org.my) source:
    “”

    Doesn’t “template-homeblog-php” above mean I have “set a the static page option in WordPress to point to the new page using the custom home page template” ?

    #3521

    Roger Leitch
    Participant
    Post count: 56

    Perhaps i am missing something here.

    I thought sticky just put posts at the top.

    I use a category “front page” and the show posts widget.
    Any post I want featured, I simply set the category to include “front page”

    E.g. a post advertising a youth event can be displayed on both the youth and front page.

    #3522

    kam onn siew
    Participant
    Post count: 12

    On a weekly basis, I review the church bulletin draft and then post notices on the website.
    Some of the notices are advance notices for events that will happen in, let’s say, a month. These are ‘sticky’ posts.
    If they are not sticky, then newer notices will push them off the front page.

    Using a category to mark front page notices means I need to mark all new notices with the category and review previous week’s notices to unmark older ones.

    The ‘sticky posts + latest posts’ option will require less maintenance than the above.

    #3523

    themeweaver
    Keymaster
    Post count: 730

    Well not really. With Roger’s suggestion you just have a category for anything you want the latest show posts to show. You don’t have to unmark them. The widget will just show the latest ones. The older ones will just disappear from view on all lists and blogs.

    In fact with sticky posts, you will need to unstick them to make sure they don’t appear on other lists of posts or on blog pages. in that sense sticky posts are higher maintenance.

    Kam, your steps above seem ok. But the fact you have empty content suggests a problem somewhere, either with the template I sent you or with any modification you might have made to it. It works for us here.

    What is the url of the page that is using the template (you don’t need to make it static to test it)?

    #3524

    kam onn siew
    Participant
    Post count: 12

    “What is the url of the page that is using the template (you don’t need to make it static to test it)?”

    http://standrewschurch.org.my/front-page/

Viewing 15 posts - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.