• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
Thomas Baugh Media

Thomas Baugh Media

SEO specialist

  • Search Engine Optimisation (SEO)
    • 9 Step SEO Process
    • SEO Costs
    • Why Work With Me
    • One-Off Or Monthly SEO?
    • What To Expect From a Monthly SEO Service
    • Working With Me
    • Brands I’ve Worked With
    • SEO Case Studies & Tesimonials
    • Free SEO Report
    • WordPress SEO
    • SEO Wolverhampton
  • Other Services
    • shopify
    • pay per click marketing (PPC)
    • social media marketing
    • web design
  • Blog
  • Reviews
  • About
  • Contact

WordPress Widget Logic code for homepage only (not paginated pages)

December 5, 2013 by Thomas

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:

is_home()

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.

http://www.yourdomain.com/page/2

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.

 

Save

Save

Save

Category: Blog

About Thomas

Next Post:I’m Hosting a Charity Screening of The Running Man

Reader Interactions

Comments

  1. Bydleni

    September 5, 2016 at 8:21 am

    Cool man, thank you very much, It is exactly I was looking for. I use it for shop page (woocommerce) and it works great too:
    is_shop() && $post==$posts[0] && !is_paged()

    Reply
  2. Bryant Green

    September 23, 2018 at 10:56 pm

    Thanks alot.. This was very helpful, You really saved me like days of research. Lol!!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Come on, let’s have a chat…

Whether you choose to hire me or not is up to you. There’s never a hard sell. But you’ll benefit from some friendly, free advice either way.

Talk to Tom
Thomas Baugh Media Ltd

62 Lea Manor Drive
Penn
Wolverhampton
WV4 5PJ

Tel: 07841921295

Email: tom@thomasbaughmedia.com

Services
  • SEO
  • PPC
  • Website Design
  • Social Media
Info
  • About
  • Contact
Be Cool

If you didn’t find what you were looking for on my website or think I can improve how I position my services, let me know.


  • Facebook
  • Twitter
  • LinkedIn

Copyright © 2026 · All Rights Reserved · Thomas Baugh Media Ltd