-
AuthorPosts
-
June 30, 2020 at 2:45 pm #1226765
Hi there,
I´d like to remove the current portfolio page from the portfolio grid at the portfolio page.
When somebody is reading the portfolio entry, he/she can see other portfolio entries in the grid at the bottom.
It would the great, if the active/current entry wouldn´t appear there.I´ve found these two answers, but they doesn´t work:
https://kriesi.at/support/topic/remove-current-portfolio-post-from-related-portfolio-grid-enfold
https://kriesi.at/support/topic/on-single-portfolio-exclude-current-portfolio-from-show-more-projects/I´m using Enfold 4.7.2
Thank you & best regards, ElaJune 30, 2020 at 5:44 pm #1226862Hey bts-de,
Please provide a link to the site/page in question so we can look into this issue further.
Best regards,
Jordan ShannonJune 30, 2020 at 9:17 pm #1226916Hi Jordan,
Thank you for your reply!
I´ve put the link into the private content field. At the bottom of the portfolio page you´ll see the other portfolio entries (inclusive the current entry).
Best regards,
ElaJuly 5, 2020 at 12:08 am #1227963Hi,
Sorry for the late reply and thanks for the links, I tested this issue by placing a “portfolio grid” element on a portfolio item page, and as you pointed out the same item shows in the “portfolio grid” element. I then tested this function and it removed the current item from the grid.function ava_exclude_portfolio($query) { $query->set( 'offset', '1' ); } add_action('pre_get_posts', 'ava_exclude_portfolio');
If this doesn’t work for you please check that the code you added doesn’t have “curly quotes” instead of straight quotes, which can break the code. Also check if your web host is using Memcached or another “object” caching program on the server, if so try to disable for testing, also try disabling your plugins and enable one at a time, clearing your cache between each activation, to see if there are any conflicts.
Otherwise, please include an admin login so we can investigate.Best regards,
MikeJuly 5, 2020 at 4:48 pm #1228046Hi Mike,
Thank you for your reply! I´ve added the code to the functions.php and tried it with diffferent browsers, unfortunately not with success. The entry is still there. Cache like Memcache, Varnish or something else is not running on the server. I´ve disabled all plugins but also with no success. Do I have to put the code at the beginning? I`ve just put it at the end …
Thank you for your help! Kind regards, Ela
July 5, 2020 at 5:34 pm #1228054Hi,
You would place it at the end. Would you like us to take a look?Best regards,
MikeJuly 6, 2020 at 10:18 am #1228238Hi Mike,
Maybe before I´ll give you the login something I´ve found out. Maybe that helps!
With the code the last entry we´ve made was no longer visible at the overview – not when I am in an entry, at the overview where all entries should appear.
Thank you for your help!!!!
Kind regards, elaJuly 6, 2020 at 2:11 pm #1228288Hi,
Sorry, the code above was the solution for the same request in another thread but with further testing, I find it offsets the items but not based on the page it is on. So we will have to keep looking.Best regards,
MikeJuly 28, 2020 at 7:53 am #1233678Hi Mike,
Ok, can I help somehow or do something? Thank you very much!
Best regards,
ElaJuly 28, 2020 at 1:11 pm #1233742 -
AuthorPosts
- You must be logged in to reply to this topic.