Site logo

Archived topic

How can i accomplish similar to this

3 replies · Started by Ashok on July 28, 2020

Viewing posts 1–4 of 4

I am wondering, if you could give me some clue on how to accomplish products table(usually 3 prouducts in a row) within a wordpress post. Pretty similar to following

https://mashable.com/roundup/best-dating-sites/

Thanks in advance

i am able to accomplish bit similar to that one, but have some obstuctions
my website is regular wordpress without woocomerce.
the 3 products in a row, are the 3 small posts which i wanted to show on each page like some featured products. If you go to this url, you will be able to see
https://thedatingadvise.com/fuckbooknet-reviews/
But those three small posts are also showing onto homepage, which i dont want. Any way to hide those?

You could add the posts to a specific Category and then add this PHP Snippet to exclude them from the main blog:

add_action( 'pre_get_posts', function( $query ) {
    if ( $query->is_main_query() ) {
        $query->set( 'cat', -10 );
    }
} );

You just need change 10 to the ID of the category you’re wanting to exclude.

This archived topic is closed to new replies.