How can I add this feature to my own WordPress widget?

James Net April 22, 2013
Pinterest Stumbleupon Whatsapp

Hi everyone,

I have made my own widget following the MakeUseOf How to Create WordPress Widgets How To Create Your Own Basic Wordpress Widgets How To Create Your Own Basic Wordpress Widgets Many bloggers will search for the perfect Wordpress widget that will do exactly what they want, but with a little programming experience you may find it's easier to write your custom widget. This week I'd... Read More post.

I would like to add to my widget settings in Appareance > Widget, so that I don’t have to edit them every time I edit the page via FTP. This is the full PHP code of my widget file: http://pastebin.com/Y2PsTGWr

Then instead of using this attribute:

$custom = new WP_Query('posts_per_page=4&cat=13&orderby=date');

I would like to add these two options to my widget settings: show the number of posts, category ID and order.

Actually as i have add the “Choose category:” option I can see all my categories but I can’t save and show them…

Thank you for your advice and help!

  1. James Net
    April 29, 2013 at 12:28 pm

    No one can help me?

    • James Net
      May 7, 2013 at 12:29 am

      ???