Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #1407826
Hide Certain Post in Other Layout (Grid) Homepage
Closed

Comments

  • Hisham started the conversation

    Hi,

    My rival keep copying my post. Is there any way that I can hide latest or certain post from appearing in the other layout (Grid) homepage  ?

  •  2,699
    PenciDesign replied

    Hi,

    You can save your posts in draft - and publish it when you done

    Best Regards,

    PenciDesign

  • Hisham replied

    Hi,

    That's not what I meant. I know how to save a draft. What I meant is hiding newly published post from appearing in the homepage (other layout-grid).

  •  2,699
    PenciDesign replied

    Hi,

    Please try add more this code at the end of functions.php file like on this image:

    /**
     * Exclude some first posts to latest posts on the homepage.
     *
     * @since 1.0
     * @return void
     */
    if ( ! function_exists( 'penci_exclude_latest_posts_homepage' ) ) {
    function penci_exclude_latest_posts_homepage( $query ) {
    if ( $query->is_home() && $query->is_main_query() ) {
    $query->set( 'offset', 3 );
    }
    } add_action('pre_get_posts','penci_exclude_latest_posts_homepage');
    }

    Change number 3 on the above code to number latest posts you want to hide on the homepage.

    Best Regards,

    PenciDesign