WordPress.org

Forums

preset widgets (2 posts)

  1. miocene22
    Member
    Posted 2 years ago #

    OK so in the theme I'm developing I would like to have it so if the wordpress install has no widgets active in the sidebar it will automatically put some there (e.g. categories, comments etc) so the sidebar is not left empty on first install.

    I've done all the register_siebar stuff and my sidebar works great. I would just like it to auto have widgets on 1st install. Once someone adds their own choice of widgets the preset ones go away.

    Is there a way to achieve this in functions.php rather than hard code widgets into sidebar.php and use conditional statement?

  2. jwack
    Member
    Posted 2 years ago #

    did u every figure this out? I am trying to figure out how to set the preset widgets when a new blog is created.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags