WordPress.org

Ready to get started?Download WordPress

Forums

Define default widgets to show in my theme (6 posts)

  1. tobbe_l
    Member
    Posted 3 years ago #

    Hi!
    I would like to define in my theme or in the wp-settings a choice of widgets to always appear in the right column when i activate my theme on a blog.

    Is this made by a plugin or by changing code? And how?

    I have search the forums for this but haven´t found any answer. Or maybe I don´t understand the ones I´ve found :-)

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Set up some default, non-dynamic, content within your theme's sidebar. See sidebar.php in Twenty Ten for an example.

  3. tobbe_l
    Member
    Posted 3 years ago #

    Thanks, but where do i find the right codes for example recent posts?

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    you have to write it! help is in the codex and google

    a recent posts would be done using query_posts or get_posts in a loop.

  5. esmi
    Forum Moderator
    Posted 3 years ago #

    You'd need to run a secondary Loop using get_posts for recent posts.

  6. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    interesting function to 'use' existing widgets:
    http://codex.wordpress.org/Function_Reference/the_widget

Topic Closed

This topic has been closed to new replies.

About this Topic