Category: Blog

December 5, 2013 Thomas 1 comment

If like many other people you use the excellent Widget Logic to control which URLs your sidebar content displays on, this may come in handy for you.

How do I know this?

I just spent a solid 2 hours looking for it myself!

If you want content to appear on the homepage only the code to enter into the Widget Logic field is:


Everyone knows that though, right?

Well, if you display your latest posts on the homepage and only want a particular widget to display on the front page not paginated versions e.g.

Then the code you need is this:

is_home() && $post==$posts[0] && !is_paged()

Hope that helps someone out! :)

Ping me a comment if you make good use of it. Always cool to know.