WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want the links widget in my sidebar to display links based on the page the user is on. For example, if the user is on the home page I want it to display link1, link2 and link3. But if the user goes to the 'About' page I want the links widget to display link4 and link5.

Is there a way to specify conditional display of links depending on the page id?


share|improve this question
up vote 3 down vote accepted

Widget Logic http://wordpress.org/extend/plugins/widget-logic/

Also Query Posts Widget is very useful http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin

share|improve this answer
the query_posts widget is awesome – curtismchale Nov 26 '10 at 3:59
+1 for Widget Logic. It's not excessively flashy in interface, but makes possible very flexible and powerful widget configurations. – Rarst Nov 26 '10 at 6:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.