Modify default query for posts to exclude featured post


I am new in creating a theme with Blade 9, although I’ve been using roots theme from it’s early days.

I can’t figure out how I can alter the index.blade.php query to exclude the one $post->ID that is coming from an Acf field (where I select the featured post).

Can anyone point me in the right direction since I’m stuck in this simple issue and I can’t figure it out?

Also, an example for ajax load more for the default archive pages would be really helpful since I couldn’t find a good example on the forums.

Thanks in advance.

I’d start with pre_get_posts.

This topic was automatically closed after 42 days. New replies are no longer allowed.