Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey Peiler, I had the same issue myself. Maybe I can help.

    I found that WCB isn’t working with Salient because of how Salient calls woocommerce content inside of the file woocommerce.php.

    WCB passes their class to the action hook woocommerce_before_main_content, but since there’s no do_action(‘woocommerce_before_main_content’) hook in Salient’s woocommerce.php file, it doesn’t show up.

    You could do a few things, either add the hook do_action(‘woocommerce_before_main_content’); to the file, and have the banner image loaded inside of div.main-content, or you can add this hook do_action(‘before_woocommerce_init’); and have it load before the main content and be a fullwidth banner image.

    Below is what I changed to get WCB working with a child theme of Salient.

    Open your functions.php file and add this line:
    add_action( 'before_woocommerce_init', array( 'WCB_Category_Banner', 'wcb_show_category_banner' ), 30 );

    now open your woocommerce.php file and change this block:

    <?php get_header();
    
    if(is_shop() || is_product_category() || is_product_tag()) {
    
    	//page header for main shop page
    	nectar_page_header(woocommerce_get_page_id('shop'));
    
    }

    to this:

    <?php get_header();
    
    if( is_shop() ) {
    	//page header for main shop page
    	nectar_page_header(woocommerce_get_page_id('shop'));
    
    } else {
    	if ( is_product_category() || is_product_tag() ) {
    ?>
    		<div class="banner">
    			<?php do_action( 'before_woocommerce_init' ); ?>
    		</div>
    
    <?php
    	}
    }

    I also had to include the styling below so there wasn’t a gap at the bottom of the banner image.

    .woocommerce img, .woocommerce-page img {
    	vertical-align: middle;
    }

    Cheers

    Hello, I’ve encounter the same issue as designwrech, though it didn’t show up for myself until after I turned on the filter for wpautop. Anyway, I’ve tracked it down to all files in the services directory.

    Basically, the shareButton, linkButton, and buttonImage have hard returns in the html, and when parsed, they show up as br tags where the hard returns are.

    Here’s an illustration for anyone interested. I’m going to use the offending code from file class-SH_Digg.php, it’s the same for all files though with the exception of class-SH_Social_Service.php

    (shareButton for Digg):

    $html = '<a class="' . $this->cssClass() . '"
    			href="https://www.digg.com/submit?'
    			. 'url='. $url. '" '
    			. ($this->newWindow ? 'target="_blank"' : '') . '>';

    Should look like this instead.

    $html = '<a class="' . $this->cssClass() . '" href="https://www.digg.com/submit?' . 'url='. $url. '" ' . ($this->newWindow ? 'target="_blank"' : '') . '>';
    $html .= $this->buttonImage();
    $html .= '</a>';

    (linkButton for Digg):

    $html = '<a class="' . $this->cssClass() . '"
    			href="'. $url. '" ' .
    			($this->newWindow ? 'target="_blank"' : '') . '>';

    Should look like this instead.

    $url = "https://www.digg.com/$username";
    $html = '<a class="' . $this->cssClass() . '" href="'. $url. '" ' . ($this->newWindow ? 'target="_blank"' : '') . '>';
    $html .= $this->buttonImage();
    $html .= '</a>';

    And finally, in file class-SH_Social_Service.php – funny name for the file =)

    buttonImage:

    $imageUrl = $this->imagePath . trim(strtolower($this->service)) . $this->imageExtension;
    		return '<img
    				   title="'.$this->service.'"
    					alt="'.$this->service. '"
    					src="' . $imageUrl .'" />';

    Should look like this:

    $imageUrl = $this->imagePath . trim(strtolower($this->service)) . $this->imageExtension;
    return '<img title="'.$this->service.'" alt="'.$this->service. '" src="' . $imageUrl .'" />';

    Anyway, that’s pretty much it. Hope it helps for those who need a quick fix until one can be made from the author.

    Thanks for the plugin, keep up the good work!

    +1, thank you.

    I found a temporary solution if you haven’t already found out yourself. Rolling back to version 3.4.4 gets BWPS working again. All of the other versions after 3.4.4 cause this white screen lockout, both front and back end.

    karizmuh

    (@karizmuh)

    Duplicate players are most likely a cause of a plugin conflict. Deactivate your plugins, then reactivate them one at a time while refreshing the page with the duplicate players after each plugin activation. You should then find the culprit.

    For me the conflict was with Shortcodes Ultimate v. 3.95

    Deets:

    • WordPress Build – 3.5.1
    • ME.js version – 2.10.3
Viewing 5 replies - 1 through 5 (of 5 total)