WordPress.org

Ready to get started?Download WordPress

Forums

activating a theme - do stuff on ctivation (3 posts)

  1. Adam
    Member
    Posted 1 year ago #

    we all know how to ctivate a theme - I hope - but what about doing stuff after a theme loads?

    For example, you get a new theme, you accidently, for what ever readon deleted the cutom folder and files inside. How would you, upon activation say - do stuff.

    if activated, do stuff. - the stuff I have done, its checking if theme is activated ot not.

    Also Does a theme, when updated via the repository (assuming your theme is stored there) deactivate during update process then reactivate? if not what steps do i need to take to say "after upgrade do this..."

    Both of these only need to happen ONCE.

  2. Good Guy
    Member
    Posted 1 year ago #

    Not sure I understand your question but you have to learn to work with Child themes so that you don't mess around with the original theme. Try this link first:

    http://codex.wordpress.org/Child_Themes

    hth

  3. Adam
    Member
    Posted 1 year ago #

    that does not help for one. I am developing my own theme and when the user activates it I need it to do stuff and do it once, it also needs to do it after the theme is updated.

    I essentially need to run a function that checks for things after activation and after the theme is updated but run only ONCE.

Topic Closed

This topic has been closed to new replies.

About this Topic