Sticky Posts Not Working

Home Forums Receptar Sticky Posts Not Working

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17710

    kevindk
    Participant

    Sticky Posts Not Working

    Resolved

    I tried the method from a previous post here and it’s not working for me. I only want the 4 sticky posts on the home page here.

    This is the post and what I tried:
    “This is a theme design decision, not a bug. I’ve decided to skip sticky posts as they tend to create confusion in posts lists pagination.

    If you need to enable them, just use this code in your child theme‘s functions.php file:

    function receptar_posts_query_ignore_sticky_posts() {}

    Here we basically override the theme function, making it do nothing.”

    Is it possible to add posts and not have them show on the main page?

    Thanks Oliver!

    #17716

    Oliver Juhas
    Keymaster

    Hi kevindk,

    The theme from version 1.4.0 actually does not modify the default WordPress sticky posts display, and that’s why the code provided before no longer works.

    I can see you are trying to have blog posts on your website front page and also on your dedicated blog page. Please understand that such functionality is not really supported in WordPress and would require much more coding than is the scope of this support service.

    But I think you can simply “fix” this by rethinking the structure of your website. Here are my tips:

    1. First, do not use sticky posts for this structure.
    2. Set your front page (homepage) to display blog posts.
    3. Set 2 main categories for your posts: “Homepage” and “Blog”. Add the posts you want to display on front page to “Homepage” category and all the other posts to “Blog” category.
    4. Add the “Blog” category to you website menu. This will become essentially your blog page, actually displaying “Blog” category archive.
    5. Use a code in your child theme (I’ve provided you some info in your previous ticket) to specify a category (“Homepage”) to display posts from on your front page (homepage, use is_front_page() conditional tag to do so).

    Best regards,

    Oliver Juhas
    WebMan Design

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.