Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #849278

    raeleewp
    Participant

    Hi

    I saw the steps to get the content dock on WooCommerce pages on this thread (https://community.theme.co/forums/topic/content-dock-on-woocommerce-pages/).

    However, if there was to be a X theme update, wouldn’t this get overridden by the new updated files?

    How can I amend the files so that it doesn’t change when at update happens?

    Hi there,

    Step 1: First, login to your FTP or file manager using cPanel and go to directory wp-content of your WordPress installation.

    Step 2: After that, go to the folder /wp-content/plugins/x-content-dock/views/site/, open the file content-dock.php in a text editor and replace the following line of code (probably line #26):

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

    With following :

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

    Step 3: This is the same step as #2 but for a different file: go to the folder /wp-content/plugins/x-content-dock/functions/enqueue/, open the file styles.php in a text editor and replace the following line of code (probably line #25):

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

    if ( is_page( $x_content_dock_entries_include ) || is_single( $x_content_dock_entries_include ) || x_is_product() || x_is_product_category() ) :
    Hope that helps.

    Also, I follows this thread as well (https://community.theme.co/forums/topic/is-there-a-way-to-add-the-content-dock-to-all-woocommerce-product-pages/), however, this code does not work.

    function add_content_dock_shop() {  
      if((x_is_product_index() || x_is_product()) && defined('X_CONTENT_DOCK_PATH')) {   
           require( X_CONTENT_DOCK_PATH . '/views/site/content-dock.php' );
      }
    
    }
    
    add_action( 'wp_footer', 'add_content_dock_shop');

    Thank you.

    #849349

    Paul R
    Moderator

    Hi,

    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.