WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] remove_theme_support Twenty Eleven (3 posts)

  1. brokenflipside
    Member
    Posted 3 years ago #

    I am trying to disable multiple post formats added to Twenty Eleven in my child theme.

    'add_action ('after_setup_theme', 'remove_post_formats');
    function remove_post_formats() {remove_theme_support('post-formats');
    }'

    I am doing everything I can to avoid editing the template theme (Twenty Eleven) or having to literally copy and paste the whole twentyeleven_setup to my child theme and deleting the necessary lines. As this would render future template theme updates obsolete or would break my child theme.

    I have tried numerous variations of the remove_theme_support function to no avail, any help would be appreciated.

  2. brokenflipside
    Member
    Posted 3 years ago #

    Problem solved, so if anyone should read this, I was missing the priority call, notice the number 11. So now the code reads like this:

    add_action ('after_setup_theme', 'remove_post_formats', 11);
    function remove_post_formats() {remove_theme_support('post-formats');
    }
  3. dgomez
    Member
    Posted 2 years ago #

    I tried to add a new post-format with this code but it's not being listed as a format.

    add_action ('after_setup_theme', 'add_post_formats', 11);
    function add_post_formats() {add_theme_support( 'post-formats', array( 'audition' ) );
    }

    I created the file content-audition.php in my child theme folder. Is there something else that makes this work?

Topic Closed

This topic has been closed to new replies.

About this Topic