• Resolved clintonium

    (@clintonium)


    So, from what I can tell from my searching, and as this ticket appears to imply, widgets are currently able to be used as global elements only. Is that correct?

    No restricting them to certain pages via conditional tags?

    Anyone know of a workaround?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter clintonium

    (@clintonium)

    Well, after several days of hearing nothing but crickets here, I rolled up my sleeves and hacked out my own workaround.

    My objective was pretty simple: I wanted one certain widget to appear on the home page only — nowhere else. So I looked through the widget code, found the function which was the real workhorse of the thing (that is, not the control panel functions, etc.), and added this code right at the beginning:

    if ( !is_home() )
         return;

    Works like a charm.

    I hope this post will help someone else trying to do the same thing.

    I would like to know how to do this as well. I can’t find the wordpress text widget php file. Does anyone know what it is called?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Widgets: Global only?’ is closed to new replies.