WordPress.org

Forums

[resolved] switch_theme() (5 posts)

  1. Jan K.
    Member
    Posted 3 years ago #

    hi,

    i just cant make this function work: http://codex.wordpress.org/Function_Reference/switch_theme

    Can you give me an example?

    Thanks a lot
    Jan

  2. shazdeh
    Member
    Posted 3 years ago #

    I have problem with this too. Please help!

  3. Jan K.
    Member
    Posted 3 years ago #

    i still dont know why it didnt work for me, but this is how to use it..

    switch_theme('THEMENAME', 'THEMENAME');

  4. shazdeh
    Member
    Posted 3 years ago #

    This is not working for me.
    THEMENAME is the theme-slug (like "twentyten"), right?

  5. Jan K.
    Member
    Posted 3 years ago #

    i've just written it into my plugin file and it works..

    switch_theme('twentyten', 'twentyten');

Topic Closed

This topic has been closed to new replies.

About this Topic