Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Remove 'Featured Content' option on Customizer?

Open blackmekemeke opened this issue 12 years ago • 7 comments

How to remove 'Featured Content' option on WordPress Customizer?

thanks

blackmekemeke avatar Dec 02 '14 04:12 blackmekemeke

Hi, Can you provide us a screenshot with "Featured Content option on WordPress Customizer" ?

ghost avatar Dec 02 '14 07:12 ghost

feat-content

blackmekemeke avatar Dec 02 '14 08:12 blackmekemeke

I don't think this box has something with the framework. We did nothing for the WordPress Customizer page

ghost avatar Dec 02 '14 17:12 ghost

Hi, Check out the function _action_theme_customize_register in hooks.php

If you remove the following code from the function, the Featured content box is removed:

// Add the featured content section in case it's not already there.
        $wp_customize->add_section( 'featured_content', array(
            'title'       => __( 'Featured Content', 'unyson' ),
            'description' => sprintf( __( 'Use a <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'unyson' ),
                esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'unyson' ), admin_url( 'edit.php' ) ) ),
                admin_url( 'edit.php?show_sticky=1' )
            ),
            'priority'    => 130,
        ) );

        // Add the featured content layout setting and control.
        $wp_customize->add_setting( 'featured_content_layout', array(
            'default'           => 'grid',
            'sanitize_callback' => '_fw_theme_sanitize_layout',
        ) );

        $wp_customize->add_control( 'featured_content_layout', array(
            'label'   => __( 'Layout', 'unyson' ),
            'section' => 'featured_content',
            'type'    => 'select',
            'choices' => array(
                'grid'   => __( 'Grid',   'unyson' ),
                'slider' => __( 'Slider', 'unyson' ),
            ),
        ) );

ankitaraikundalia avatar Dec 05 '14 07:12 ankitaraikundalia

Thank you @ankitaraikundalia

That code remains from the twentyfourteen theme, which the scratch theme is based on.

ghost avatar Dec 05 '14 08:12 ghost

Welcome @moldcraft

ankitaraikundalia avatar Dec 05 '14 09:12 ankitaraikundalia

Thank you @ankitaraikundalia and @moldcraft

blackmekemeke avatar Dec 05 '14 14:12 blackmekemeke