12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Aug 19, 2020

How to Exclude Current Post from Recent Posts when using Easy Posts in Oxygen

Sridhar Katakam

This premium tutorial is similar to the earlier one but when using an Easy Posts component instead of a Repeater for excluding the current post from Recent Posts on single post pages with Oxygen.

We shall

  • add an Easy Posts with custom Template PHP and Template CSS where the featured image will be set to appear as a regular img element that is properly sized instead of a full-sized background image.
  • use pre_get_posts to alter the Easy Posts query so it does not include the current post being viewed.

Step 1

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: Custom excerpt

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right