how to move widgets above default categories in sidebar
-
Hi,
I can see how to use the widget interface on my dashboard to re-arrange the order of sidebar widgets.
But how do I set it so that my widgets (RSS feed, search, etc) appear above the list of Categories in the sidebar?thanks for any help
Cra2
-
If you are unable to arrange the widgets in the desired order by simply dragging and dropping them in the sidebars, the item you are trying to move may be hard coded into the theme. A link to your site, or mentioning what theme you are using might be helpful.
I wasn’t clear.
The widgets move around just fine on the site when I re-order/remove them.
The widgets (under Appearance on my Dash) are Events, Archives, and Text.Yet on my site, there are Categories above all that on my sidebar.
They’re the categories I’ve created and manage via the Dashboard.
And I’m glad they’re on the sidebar.I just wanted them to appear lower than the Events widget, for example.
But I can’t control where the Categories appear because the Categories widget isn’t enabled. It’s not in the sidebar (in Dashboard) – it’s still sitting over on the lefthand list of widgets you can drag over and activate if you choose.So if it’s not activated, then I’m guessing the theme itself is presenting the Categories in the sidebar.
Is there a simple edit I can make that will allow me to control where the categories appear using the widget interface in Dashboard?Or, if that’s difficult (since I’m not a ‘poet’, i.e. programmer), then is there a simple way for me to just move the “events” widget up above the Categories?
Here is the sidebar.php :
<!-- sidebar START --> <?php $options = get_option('sthblue_options'); if($options['feed'] && $options['feed_url']) { if (substr(strtoupper($options['feed_url']), 0, 7) == 'HTTP://') { $feed = $options['feed_url']; } else { $feed = 'https://' . $options['feed_url']; } } else { $feed = get_bloginfo('rss2_url'); } ?> <div id="sidebar-wrapper"> <div id="sidebar"> <div class="sidebar-box"> <h2>Categories</h2> <ul class="list-cat"> <?php wp_list_categories('hide_empty=0&show_count=0&title_li='); ?> </ul> </div> <div class="sidebar-box"> <div class="content"> <div id="subscribe"> <a rel="external nofollow" id="feedrss" title="<?php _e('Subscribe to this blog...', 'SthBlue'); ?>" href="<?php echo $feed; ?>"><?php _e('<abbr title="Really Simple Syndication">RSS Feed</abbr>', 'SthBlue'); ?></a> </div> <?php if($options['twitter'] && $options['twitter_username']) : ?> <a id="followme" title="<?php _e('Follow me!', 'SthBlue'); ?>" href="https://twitter.com/<?php echo $options['twitter_username']; ?>/"><?php _e('Twitter', 'SthBlue'); ?></a> <?php endif; ?> <div class="fixed"></div> </div> </div> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <div class="sidebar-box"> <h2>Archives</h2> <ul class="list-archives"> <?php wp_get_archives('type=monthly'); ?> </ul> </div> <div class="sidebar-box"> <h2>Blogroll</h2> <ul class="list-blogroll"> <?php get_links(-1, '<li>', '</li>', ''); ?> </ul> </div> <div class="sidebar-box"> <h2>Search</h2> <div style="margin-left: 20px;"> <?php include (TEMPLATEPATH . '/searchform.php'); ?> </div> </div> <div class="sidebar-box"> <h2>Meta</h2> <ul> <?php wp_register(); ?> <li> <?php wp_loginout(); ?> </li> <li><a href="https://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li> <li><a href="https://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li> <li><a href="https://www.ads-software.com/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li> <?php wp_meta(); ?> </ul> </div> <?php endif; ?> </div> </div> <!-- sidebar END -->
Or, if that’s difficult (since I’m not a ‘poet’, i.e. programmer), then is there a simple way for me to just move the “events” widget up above the Categories?
I am not familiar with a “Events” widget present in wordpress by default, and I see no reference to the “Events” widget in the sidebar.php you posted, so anything else would just be a guess. Are you using some type of calendar plugin? Sometimes, visualization makes all the difference in the world. Seeing what you are seeing, or at least knowing what theme you are using, may get a helpful answer.
…So again, a link to your site, or if that is not possible, sharing the name of the theme you are using (unless of course it’s your own creation) might yield a more informed answer or creative idea.
But I can’t control where the Categories appear because the Categories widget isn’t enabled. It’s not in the sidebar (in Dashboard) – it’s still sitting over on the lefthand list of widgets you can drag over and activate if you choose.
Just an after thought… Have you tried dragging the categories widget from the left to the sidebar area, thus replacing the default arrangement and possibly enabling a more creative ordering of your widgets?
yes, the “Events” widget I was referring to is a calendar plugin.
yes I have dragged the default categories widget over and all it does is add a second list of categories to the sidebar.
the site is at https://www.flowflorida.com
Here is the revised code for the sidebar. It should move the rss and the twitter icons to the top of the sidebar above the the hard-coded categories. That might give you a push in the right direction. Make a backup of the old sidebar.php file before you try it just in case I made an error somewhere.
If you want to remove the hard coded categories altogether, you can try just removing this from the sidebar code;
<div class="sidebar-box"> <h2>Categories</h2> <ul class="list-cat"> <?php wp_list_categories('show_count=0&title_li='); ?> </ul> </div>
And use the categories widget instead.
Thanks Clayton, I will try to remove the hard code you suggested.
If I can manage the categories (and their placement) via the widget, that would probably solve my problem.Hi Everyone, I have a similar question. I am using the WIRENEWS wordpress theme by NewWpThemes.com
I have installed a shopping cart and the widgets on rightmost sidebar while they can be selected on or off, I cannot put my shopping cart checkout widget at the very top of the sidebar. Anyone have any clues?
- The topic ‘how to move widgets above default categories in sidebar’ is closed to new replies.