Tagged: x
-
AuthorPosts
-
May 22, 2016 at 2:27 am #1003622
HillsDistrictDadsParticipantHi
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
May 22, 2016 at 2:38 am #1003630
Rue NelModeratorHello 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.
May 22, 2016 at 4:42 am #1003707
HillsDistrictDadsParticipantThanks 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?
May 22, 2016 at 4:46 am #1003711
HillsDistrictDadsParticipantI 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.
May 22, 2016 at 3:28 pm #1004129
RadModeratorHi 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!
May 22, 2016 at 8:09 pm #1004359
HillsDistrictDadsParticipantHi Rad
Entered the update code and cleared cache. Content Dock is appearing on all pages still, regardless of whether they are selected or not.
May 22, 2016 at 10:14 pm #1004512
RadModeratorHi 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!
May 22, 2016 at 10:32 pm #1004527
HillsDistrictDadsParticipantThis reply has been marked as private.May 23, 2016 at 12:08 am #1004620
RadModeratorHi 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!
May 23, 2016 at 12:43 am #1004651
HillsDistrictDadsParticipantAt 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.
May 23, 2016 at 1:11 am #1004669
RadModeratorHi there,
I just checked it’s no more appearing on those 3 pages. Please clear your cache before testing.
Thanks!
May 23, 2016 at 2:04 am #1004721
HillsDistrictDadsParticipantThis reply has been marked as private.May 23, 2016 at 2:25 am #1004756
Rue NelModeratorHello 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.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1003622 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
