SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2010
    Posts
    229
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    adding widget IDs to a theme

    I've implemented the Centita theme on this site.

    How can I assign an ID to the individual widgets's sidebox-top and sidebox? The problem is that on that page, I wanted to hide the top widget so I put #cforms-3 {display:none;} into the CSS which did hide the middle part of the widget, but it left the sidebox and sidebox top because there's no ID i can attribute to those.

    These are the two files that I'm assuming drive the widget code...
    themewidgets.php: http://pastebin.com/32xWBiJy
    sidebar.php: http://pastebin.com/eTk25UFz

    ...but I don't know what to do to them to assign an ID to each widget area.

    Please advise. Thanks in advance.

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can place a specific widget area anywhere you want in a layout/theme/theme files with this:
    PHP Code:
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Widget Area Name') ) : ?>
       <!-- this is for the "Widget Area Name" widget -->
    <?php endif; ?>
    "Widget Area Name" being the name of the widget.

    Hope this helps to answer your question? If I'm way off track with what you are asking posts again and I will try harder to understand.

  3. #3
    SitePoint Addict
    Join Date
    May 2010
    Posts
    229
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    great. thank you!


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •