featured image conflict with woo commerce

Home Forums Calendar Products Events Calendar PRO featured image conflict with woo commerce

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #938927
    Pamela
    Participant

    We have a new install of Pro, uDesign child theme. I have diagnosed a conflict with woocommerce that causes the featured image option to disappear from the events/add events admin dashboard.
    Is this a known issue? Any easy fix?
    Install and problem are on a development site at ilaacp.org/2015.

    #938930
    Pamela
    Participant

    OK, on further diagnosis, the conflict is with the combination of uDesign & woocommerce. I have tried to use this fix in child theme functions.php:

    // Add support for post featured image.  To add this feature to other post types, add those new types to the array, e.g. array( 'post', 'page', 'movies' )
    if ( function_exists( 'add_theme_support' ) ) {
        add_theme_support( 'post-thumbnails', array( 'post', 'page', 'movie', 'product', 'tribe_events' ) );
        add_theme_support('post-thumbnail', array('post', 'tribe_events'));
        ?>

    But every time I try to add it, I’m breaking the functions.php (real hacker in php). I’m showing the entire functions.php here in hopes that you will recognize

        where to put that code if it is right, and
        if the necessary post types for events calendar are included in the array
        or any other issues or fixes.

    Thanks much,
    Pamela

    <?php 
    /**
     * @package WordPress
     * @subpackage U-Design
     */
    if ( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    /**** BEGIN ADDING YOUR CODE BELOW: ****/
    	// Add support for post featured image.  To add this feature to other post types, add those new types to the array, e.g. array( 'post', 'page', 'movies' )
    
    /**** redirect logo image ****/
    
    function run_after_parent_theme_setup() {
     
      function modify_top_elements_logo( $is_front_page ) {
        ob_start(); ?>
                        <div id="logo" class="grid_14">
      <?php                   if( $is_front_page ) : ?>
                                <h1><a title="<?php bloginfo('name'); ?>" class="pngfix" href="http://ilaacp.org"><?php bloginfo('name'); ?></a></h1>
      <?php                   else : ?>
                                <div class="site-name"><a  title="<?php bloginfo('name'); ?>" class="pngfix" href="http://ilaacp.org"><?php bloginfo('name'); ?></a></div>
      <?php                   endif; ?>
                        </div>
      <?php
        $logo_html = ob_get_clean();
        echo apply_filters( 'udesign_get_logo', $logo_html );
      }
     
      // remove the original declaration of 'udesign_top_elements_inside' from the parent theme:
      remove_action('udesign_top_elements_inside', 'udesign_top_elements_logo', 9);
      // call our new function 'udesign_top_elements_inside' we declared above:
      add_action('udesign_top_elements_inside', 'modify_top_elements_logo', 9);
     
    }
    add_action('after_setup_theme', 'run_after_parent_theme_setup');
    
    #939091
    Josh
    Participant

    Hey Pamela,

    Thanks for reaching out to us!

    It looks like your first snippet is failing because it is missing the closing “}” for the conditional. However, since you’re using the latest version of WordPress I would recommend losing the “function_exists” conditional and just adding the following under line 9 of your functions.php file:

    
    add_theme_support( 'post-thumbnails', array( 'post', 'tribe_events' ) );
    

    Let me know if this helps.

    Thanks!

    #939119
    Pamela
    Participant

    Thanks for the response.
    If I wasn’t under such a deadline, I would go read a book on php.
    That snippet is erroring out in a validator. screenshot attached.screenshot

    #939120
    Pamela
    Participant
    #939315
    Pamela
    Participant

    OK, I don’t know where all that garbage came from in my earlier code, but I did successfully place your snippet after line 9.
    add_theme_support( 'post-thumbnails', array( 'post', 'tribe_events' ) );
    Unfortunately, it didn’t fix the conflict.
    If you can think of anything else, that will be great. I will also keep trying to figure it out.
    Thanks.

    #939317
    Pamela
    Participant

    So, the UDesign theme comes packaged with WPBakery Visual Composer plugin, but I am not using it on this site.
    But if I activate it, the featured image option becomes available in Add New Events admin for The Events Calendar.
    Weird.
    Resolved, but weird.
    Thanks,
    Pamela

    #939358
    Josh
    Participant

    Hey Pamela,

    Thanks for following up with us.

    That is definitely strange but probably some type of override they’re using to control the display of their own content that has bled over into other Custom Post Types. I’m glad you were able to find a solution!

    I’ll go ahead and close this ticket. If you have any further questions, please don’t hesitate to open a new one.

    Thanks!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘featured image conflict with woo commerce’ is closed to new replies.