Support » Themes and Templates » remove_theme_support Twenty Eleven

  • Resolved mgratch

    (@brokenflipside)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • mgratch

    (@brokenflipside)

    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');
    }
    dgomez

    (@dgomez)

    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘remove_theme_support Twenty Eleven’ is closed to new replies.