Forums

Custom Sidebar Widgets: By Page (5 posts)

  1. jonpb
    Member
    Posted 10 months ago #

    Hi all,

    Is there a way to have the sidebar contain a list of all possible sidebar widgets, but control which widgets appear on a given page?

    Ex: Sidebar.php would have the following widgets:
    item 1
    item 2
    item 3
    item 4
    item 5

    I may have item 1 on the about page, and items 1, 3, and 5 on the contact page. Is there a way to do this with custom fields?

    Many thanks in advance!

  2. Anderton
    Member
    Posted 10 months ago #

  3. jonpb
    Member
    Posted 10 months ago #

    Thanks for the reply. I did look at this a bit, although itisn't quite what I'm looking for. I'm hoping for something where the widgets are basically all in the sidebar, but I turn them 'on' or 'off' as needed, on a page by page basis, using custom fields.

    Thanks so much,

    j

  4. alanft
    Member
    Posted 10 months ago #

    you could try my plugin
    http://wordpress.org/extend/plugins/widget-logic/

    i've not tried code based on custom fields. but i bet it's not that difficult. Something like

    is_single() && (get_post_custom_values('custom_field_name')=='show widget X')

    would work

  5. jonpb
    Member
    Posted 10 months ago #

    Thanks Alanft -I looked at your post too. I was trying to have my own custom widgets -not using the WP widgets at all... Thanks again!!

Reply

You must log in to post.

About this Topic

Tags

No tags yet.