Support » Requests and Feedback » Moving a widget

  • Hello,

    I’m facing an issue. At the moment I’m using WordPress 2.7.1 with the plugin Mailpress installed. This contains a widget, which is used to subscribe to a mailinglist, as you might know.

    Now, what I want to achieve is to move the widget to the top of the website, to make it replace the search bar.

    Is this possible in any way? Better: is it possible to move the widgets in WordPress from the sidebar, at all?


Viewing 5 replies - 1 through 5 (of 5 total)
  • You’d need to widgetize the relevant template file.

    Any docs available for that?


    It talks about sidebars but you can use exactly the same approach in any template file. For example, I’ve created a few home page templates that include this snippet:

    <?php the_content(); ?>
    <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Homepage')) : ?>
    <?php endif; ?>

    Then in functions.php, I have:

    if (function_exists('register_sidebar')) {
    		'name'=> 'Main',
    		'id' => 'main',
    		'before_widget' => '<div class="widget_box side">',
    		'after_widget' => '</div>',
    		'before_title' => '<h3>',
    		'after_title' => '</h3>',
    		'name'=> 'Homepage',
    		'id' => 'homepage',
    		'before_widget' => '<div class="widget_box">',
    		'after_widget' => '</div>',
    		'before_title' => '<h3>',
    		'after_title' => '</h3>',

    Hope that helps.

    Cool, I’ll try to work it out. I’ll contact you if I can’t get it to work, if that’s OK with you.

    Thanks so far!

    Not sure if this is the place for this but I thought I might give it a whirl. I am using qtranslate in my theme but I want to take the flags in the theme and move them insided the header anysuggestions. thanks in advance


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Moving a widget’ is closed to new replies.