I am attempting to exclude all sticky posts from my home.php page in Adventurous theme. I have specified a category to be shown on the home page. When I stick any post, it appears above the category posts – which is normal.
What I want is not to show the sticky posts in the home page. I tried this code in home.php $the_query = new WP_Query( array( 'post__not_in' => get_option( 'sticky_posts' ) ) ); but it removes the front page category’s posts.
How can I exclude the sticky posts from Home.php??!
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.