• Does such a thing exist? If so how do I set it up?

    Want to list pages from category 1 on the sidebar in a dropdown widget. And then the same again with category 2, but just listed, no dropdown.

    In other words, having ‘New Reviews’ pages linked on the sidebar, and then old reviews in a dropdown.

    movie-moron dot com If you need to see the site.

    Many thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • When you say ‘list pages from category 1″ assume you mean posts, as Pages don’t have categories…

    Couldn’t find an exact widget for you. But, this search:
    https://www.google.com/search?q=wordpress+widget+recent+posts+by+category

    returned some interesting items, including:
    https://jameslao.com/2007/10/21/category-posts-wordpress-widget/
    https://blue-anvil.com/archives/create-a-wordpress-recent-posts-widget

    For the dropdrown requirement, look at wp-includes/widgets.php to see how the developers handle the dropdown option for the category widget.

    Thread Starter sheridanpassell

    (@sheridanpassell)

    Thanks for your speedy response. Yes, I did mean posts.

    Unfortunately the James Leo widget triggers a ‘fatal error’ when trying to activate –

    Fatal error: Cannot redeclare nk_cat_posts_widget() (previously declared in /home/content/o/l/d/oldsheri/html/blog/wp-content/plugins/category-posts/cat-posts.php:12) in /home/content/o/l/d/oldsheri/html/blog/wp-content/plugins/cat-posts-1.0/cat-posts.php on line 12

    And the ‘Posts By Category’ widget activates, but then leaves this scrawled along the top of every page –

    WordPress database error: [Table ‘mmblogtopman.wp_post2cat’ doesn’t exist]
    SELECT post_date, ID, post_title, cat_name, cat_ID FROM wp_posts, wp_post2cat, wp_categories WHERE wp_posts.ID = wp_post2cat.post_id AND wp_categories.cat_ID = wp_post2cat.category_id AND post_status = ‘publish’ AND post_type != ‘page’ AND post_date < NOW() ORDER BY cat_name ASC, post_date DESC

    Most other widgets work fine.

    The other issue I’m having is with the standard widgets in general. Many of them, such as ‘recent posts’ allow you to change how many posts are displayed in the sidebar arrangement screen, but then when you save the change, the value resets. Eg I set recent posts to 10 when I first tried it out, and have been unable to change it since.

    I really appreciate your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Drop Down Widget That Lists Pages From 1 Category’ is closed to new replies.