Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1357138
    SmithChiro
    Participant

    Hi all, I have searched far and wide to try and fix this problem by myself, but I need the X gurus.

    When I place a Woocommerce link into a blog post, the link automatically turn the link into a nice product box as you can see in the attached image (I believe this is a WordPress function). However, in the lower left hand corner, you can see a broken image link next to “Good Living Warehouse” and I have no clue how to insert my logo there.

    Any suggestions?

    Thank You for your help.

    #1357140
    SmithChiro
    Participant

    In case you need a working link (the previous page is a draft), here is a live version.

    http://www.goodlivingwarehouse.com/7-best-natural-supplements-to-help-lower-cholesterol/

    Image also attached.

    #1357621
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! When embedding a WordPress, it will display your post with an icon. That icon will not come from your customizer setting or your site’s favicon. You have to set it up usually if you are using multiblog setup. To change it with the favicon you have set in the customizer, you need to customized it.

    Because what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    After the child theme is set up, please add the following code in your child theme’s functions.php file

    // Apply the customizer's favicon to WP Embedded content 
    // =============================================================================
    add_filter( 'get_site_icon_url', 'x_custom_wp_embedded_icon' );
    function x_custom_wp_embedded_icon($url){
      $icon = x_get_option( 'x_icon_favicon', '' );
    
      if ( $icon != '' ) {
        return $icon;
      } else {
        return $url;
      }
    }
    // =============================================================================

    We would loved to know if this has work for you. Thank you.

    #1359851
    SmithChiro
    Participant

    Unfortunately, this did not work. The image is still broken. I should say I am using a plugin called RealFaviconGenerator to render my favicons. Does that matter?

    #1359864
    Joao
    Moderator

    Hi There,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Joao

    #1359954
    SmithChiro
    Participant
    This reply has been marked as private.
    #1360659
    Lely
    Moderator

    Hi There,

    Thank you for the credentials. Please try this code instead:

    // Apply the customizer's favicon to WP Embedded content 
    // =============================================================================
    add_filter( 'get_site_icon_url', 'x_custom_wp_embedded_icon' );
    function x_custom_wp_embedded_icon($url){
      $icon = x_get_option( 'x_icon_favicon', '' );
    
      if ( $icon != '' ) {
        return $icon;
      } else {
        return 'http://www.goodlivingwarehouse.com/wp-content/uploads/2016/02/GLW-Logo-White-x-350.png';
      }
    }

    Hope this helps.

    #1361682
    SmithChiro
    Participant

    Thank you for your response. The image is now pulling something, but it’s not my favicon. Is there a pathway I can change to indicate the image I’m trying to pull? Or is it pulling a random pic in my image gallery? I’m ultimately trying to load my company logo which is the “G” on the main page.

    #1362316
    Christopher
    Moderator

    Hi there,

    Please replace your favicon URL with following line in provided code :

    http://www.goodlivingwarehouse.com/wp-content/uploads/2016/02/GLW-Logo-White-x-350.png

    Thanks.

    #1363000
    SmithChiro
    Participant

    Brilliant. That worked. Your help is much appreciated, as always. Have a nice day!

    #1363031
    Prasant Rai
    Moderator

    You are most welcome. 🙂

  • <script> jQuery(function($){ $("#no-reply-1357138 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>