Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1003622
    HillsDistrictDads
    Participant

    Hi

    The ability to add Content Dock to all pages is documented here https://community.theme.co/forums/topic/content-dock-all-pages/

    How would I modify it so that instead of selecting all the pages I want Content Dock to appear on, I select the pages I don’t want it to appear on.

    Reason being, I don’t want to manually add each new post as in include – but rather just exclude WOO and a few other pages.

    Thanks in advance,

    Benjamin

    #1003630
    Rue Nel
    Moderator

    Hello Benjamin,

    Thanks for writing in! To do what you have in mind, you need to edit the entire plugin files. You need to find any instance of this line:

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

    You need to replace it with this line instead:

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

    Please let us know if this works out for you.

    #1003707
    HillsDistrictDads
    Participant

    Thanks Rue

    I only had “if ( is_page( $x_content_dock_entries_include ) || is_single( $x_content_dock_entries_include ) ) :”

    in /plugins/x-content-dock/functions/enqueue/styles.php

    I changed as instructed but it is still functioning as intended without the modification.

    Where else was I supposed to find the above code?

    #1003711
    HillsDistrictDads
    Participant

    I lied, I found the other in views/site/content-dock.php and updated it too

    Now the content dock is showing all pages regardless of whether they are marked to be included or not.

    #1004129
    Rad
    Moderator

    Hi there,

    Please try this,

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

    Then clear your cache before testing, as it may not reflect in real-time.

    Thanks!

    #1004359
    HillsDistrictDads
    Participant

    Hi Rad

    Entered the update code and cleared cache. Content Dock is appearing on all pages still, regardless of whether they are selected or not.

    #1004512
    Rad
    Moderator

    Hi there,

    In that case, please provide your admin and FTP login credentials in private reply. And please provide the URL of the page where it should not appear.

    Thanks!

    #1004527
    HillsDistrictDads
    Participant
    This reply has been marked as private.
    #1004620
    Rad
    Moderator

    Hi there,

    Is it the correct FTP folder? I can’t find the content dock plugin there. For the meantime, please change that code to this

    if ( !( is_page( $x_content_dock_entries_include ) || is_single( $x_content_dock_entries_include ) || is_home() || x_is_shop() || is_page(508) ) ) :

    Thanks!

    #1004651
    HillsDistrictDads
    Participant

    At that exact moment you logged in it was migrating to new server. All updated – FTP will now work.

    Updated code, still not functioning as intended.

    #1004669
    Rad
    Moderator

    Hi there,

    I just checked it’s no more appearing on those 3 pages. Please clear your cache before testing.

    Thanks!

    #1004721
    HillsDistrictDads
    Participant
    This reply has been marked as private.
    #1004756
    Rue Nel
    Moderator

    Hello There,

    I am another staff staff checking on these two pages. I have tried opening these two urls in different browser. I even used Chrome’s incognito mode. Content dock is no longer displaying on the said pages. What happened in your end could just be a caching issue.

    Are you using CloudFlare or may have installed a caching plugin like WordFence, W3 Total Cache or WP Super Cache? Please keep in mind that after doing every updates, always remember to clear all caches when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

    Thank you.

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