Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1134184
    jptrotier
    Participant

    Hello,
    I Have a problem with content dock. I installed the extension and activated. I added this code to my css :

    .x-content-dock {
    background: url(“http://manoirmaplewood.com/wp-content/uploads/2016/08/PUB_flottante_Manoir5.jpg”) center center / contain no-repeat;
    width: 600px;
    height: 190px;
    margin-bottom: 10px;
    opacity: 1;
    }

    Then i added this code in /wp-content/plugins/x-content-dock/functions/options.php :

    global $sitepress;

    if ( function_exists( ‘icl_object_id’ ) && is_callable( array( $sitepress, ‘get_current_language’ ) ) ) {

    foreach ( $x_content_dock_entries_include as $ID) {

    $post = get_post( icl_object_id( $ID, get_post_type(), false, $sitepress->get_current_language() ) );
    $x_content_dock_entries_include[] = $post->ID;

    }

    }

    For the widget to be appears everywhere ( WPML problem solution find in your Forum) . Everything works except on the home page of the site ( french home ). The widget case appears but empty ??
    Work fine on the english home page

    Thank you for your help

    #1134186
    jptrotier
    Participant
    This reply has been marked as private.
    #1134725
    Rupok
    Member

    Hi there,

    Thanks for writing in! I can see this empty on English home page as well. Would you clarify what was the purpose of the code you have added to content dock function? Does it work as expected if you take off the code?

    #1135096
    jptrotier
    Participant

    It’s related to this post :
    https://community.theme.co/forums/topic/content-dock-missing-in-other-language/

    When I installed content dock initially , the widget was displayed only in French . Can not display in 2 languages ​at the ​same time. I found this code to fix be the problem view with WPML over the site.

    #1135289
    Rupok
    Member

    Hi there,

    It seems there is a solution for that – https://community.theme.co/forums/topic/content-dock-missing-in-other-language/#post-998008

    Did you try this?

    Thanks!

    #1135347
    jptrotier
    Participant

    You send me the same link i gaved you in example 🙂
    So now i haved try the first part of the code in the post :

    \wp-content\plugins\x-content-dock\views\site and edit this file content-dock.php

    Then replace this line of code

    if ( is_page( $x_content_dock_entries_include ) || is_single( $x_content_dock_entries_include ) ) :

    with this new code

    if ( function_exists( ‘icl_object_id’ ) && is_callable( array( $sitepress, ‘get_current_language’ ) ) ) {

    $post = get_post( icl_object_id( $x_content_dock_entries_include, get_post_type(), false, $sitepress->get_current_language() ) );

    $x_content_dock_entries_include = $post->ID;

    }

    if ( is_page( $x_content_dock_entries_include ) || is_single( $x_content_dock_entries_include ) ) :

    NOT WORKING. I just have the content in one language at time.

    i haved also try the last code mentioned in the post, work well but the home page have an empty widget.

    Thanks for your time

    #1135811
    Friech
    Moderator
    This reply has been marked as private.
    #1135816
    jptrotier
    Participant
    This reply has been marked as private.
    #1136281
    Paul R
    Moderator

    Hi,

    You can try this third party plugin.

    Wordfence Security – Firewall, Malware Scan, and Login Security

    Hope that helps

    #1142136
    jptrotier
    Participant

    Hi, so can you connect to my site to help me ?
    If not, can you suggest me an alternatvie to content dock. Not work well with WPML.
    thanks

    #1142799
    Paul R
    Moderator

    Hi,

    Can you provide us your ftp login.

    I would like to check but the login provided above doesn’t seem to work.

    Thanks

    #1142943
    jptrotier
    Participant
    This reply has been marked as private.
    #1144091
    Lely
    Moderator

    Hi There,

    It is not working on your french page because of this custom CSS you have added on Cornerstone > Settings Tab > Custom CSS:

    .x-content-dock {
        background: url("http://manoirmaplewood.com/wp-content/uploads/2016/08/PUB_flottante_Manoir1.jpg") no-repeat scroll center center / cover;
    }

    This file is missing: http://manoirmaplewood.com/wp-content/uploads/2016/08/PUB_flottante_Manoir1
    On other french pages, it is working because of the following custom CSS from your child theme style.css:

    .x-content-dock {
        background: url("http://manoirmaplewood.com/wp-content/uploads/2016/08/PUB_flottante_Manoir5.jpg") center center / contain no-repeat;
        width: 600px;
        height: 190px;
        margin-bottom: 10px;
        opacity: 1;
    }

    That image background is available unlike the one on your homepage.
    Then to activate on all pages on both language, please update the following code on content-dock.php
    if ( is_page( $x_content_dock_entries_include ) || is_single( $x_content_dock_entries_include ) ) :

    To this:

    global $sitepress;
    
    if ( function_exists( 'icl_object_id' ) && is_callable( array( $sitepress, 'get_current_language' ) ) ) {
    
    foreach ( $x_content_dock_entries_include as $ID) {
    
      $post = get_post( icl_object_id( $ID, get_post_type(), false, $sitepress->get_current_language() ) );
      $x_content_dock_entries_include[] = $post->ID;
    
    }
    
    }
    
    if ( is_page( $x_content_dock_entries_include ) || is_single( $x_content_dock_entries_include ) || is_home() ) :
    

    Hope this helps.

    #1144693
    jptrotier
    Participant

    Thanks Lely,

    i feel bad for the custom css in the page.. i completely forgot this. It’s now fix.

    But… little problem. When i add the code to it work on all pages.. Ok on the french version.
    But in the english version, the widget appear at the very bottom of the pages..
    thanks

    #1145491
    Rad
    Moderator

    Hi there,

    I can’t seem to access your site on my end. I already disabled my anti malware/anti virus software and still the same. Are you sure that there is no existing malware? Maybe my internet provider or DNS provider also blocks those malware marked websites.

    Is there a way you can clone your site on a different domain as dev?

    Thanks!

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