Forums

Issues in creating a widget (1 post)

  1. lriggle
    Member
    Posted 1 month ago #

    Hi Guys!

    I'm creating a widget for my employer that's basically the same as the "Recent Posts" widget that comes standard with wordpress. The only difference is instead of just making a list of the titles of posts, it displays the posts themselves.

    I know this seems kind of strange, but it's for a client's layout. She doesn't know much about the internet (just enough to be dangerous) and is insistant on having a Page as her front page, but also having a few blog posts on it.

    Anyway, I've got the widget created, and I can upload it and activate it in the plugin page, but when I go to Appearance > Widgets to put it in a sidebar, it doesn't show up.

    And I'm not sure why.

    Before the class, i have add_action("widgets_init", array('Latest_Updates', 'register'));

    After that comes the class. Inside is the constructor, widget(), update(), and form() functions.

    At the bottom, outside of the class, I have register_sidebar_widget('Latest_Updates', 'Latest_Updates');

    The contents of the widget itself is just a slightly modified version of the WP_Widget_Recent_Posts widget in wp-includes/default-widgets.php.

    Does anyone have any advice?

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 1 month ago by lriggle
  • WordPress version: 2.8.4
  • This topic is not a support question

Tags