Extended Pages widget (7 posts)

  1. willem g
    Posted 7 years ago #

    Extended Categories widget
    Replacement of the default WordPress category widget to allow for greater customization of the category widget.

    Is there a plugin with this layout(dropdown box) for pages and subpages you can use for example in de left sidebar?

  2. MichaelH
    Posted 7 years ago #

    Consider downloading and installing Otto's PHP Code Widget.

    Then put this in one of those widgets:

    <?php wp_dropdown_pages(); ?>

    Please remember to support our plugin authors by clicking on the Donate button there.

  3. willem g
    Posted 7 years ago #

    I put it in the text widgets. It's shows up at my homepage but when i select a page in the dropdownbox nothing happens. If i change <?php wp_dropdown_pages(); ?> into <?php wp_list_pages(); ?> the links work fine.

    Why doesn't the dropdown not work?

  4. MichaelH
    Posted 7 years ago #

    Try the Dropdown_with_Submit_Button example

  5. Adam W. Warner
    Posted 6 years ago #

    I have just tried the same as willem g. I am using Otto's PHP Code Widget and have inserted this code:

    <?php wp_dropdown_pages('include=1409,1411,1413,1415,1417,1419,1421,1423&sort_column=ID' ); ?>

    Why don't these links work as the categories widget when dropdowns are selected?

    I have implemented the submit button solution, but I am still looking for the "jump" menu solution. Is it possible?

  6. Adam W. Warner
    Posted 6 years ago #

    Got it working!

    <li id="pages">
    	<h2><?php _e('pages'); ?></h2>
    	<form action="<?php bloginfo('url'); ?>/" method="get">
    	$select = wp_dropdown_pages('show_option_none=Select pages&show_count=1&include=1409,1411,1413,1415,1417,1419,1421,1423&sort_column=ID&echo=0');
    	$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
    	echo $select;
    	<noscript><input type="submit" value="View" /></noscript>
  7. M
    Posted 6 years ago #

    fine but if you add selected=1 - it doesn't work!

Topic Closed

This topic has been closed to new replies.

About this Topic