• Hello, I have been trying for DAYS to get a Featured image on the SHOP page of my WooCommerce plugin to work (I know its an archive page and can’t normally do this, but i’ve been trying to override it.) I have followed instructions exactly, and nothing happens.

    I have the Child Theme Twenty-Fourteen. Here is my functions.php file:

    <?php

    // Add support for featured content.
    function twentyfourteen_child_setup () {
    // This will remove support for featured content in the parent theme
    remove_theme_support( ‘featured-content’ );

    //This adds support for featured content in child theme
    //with a different max_posts value of 3 instead of default 6
    add_theme_support( ‘featured-content’, array(
    ‘featured_content_filter’ => ‘twentyfourteen_get_featured_posts’,
    ‘max_posts’ => 999,
    ) );

    }

    //Action hook for theme support
    add_action( ‘after_setup_theme’, ‘twentyfourteen_child_setup’, 11);

    //declaire WooCommerce support
    function mytheme_add_woocommerce_support() {
    add_theme_support( ‘woocommerce’ );
    }
    add_action( ‘after_setup_theme’, ‘mytheme_add_woocommerce_support’ );

    // Add featured image to WooCommerce SHOP page
    add_action(‘woocommerce_before_main_content’, ‘wp176545_add_feature_image’);

    function wp176545_add_feature_image() {

    echoget_the_post_thumbnail( get_option( ‘woocommerce_shop_page_id’ ) );

    }

    The page I need help with: [log in to see the link]

  • The topic ‘Child Theme WooCommerce Shop Featured Image’ is closed to new replies.