Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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, Ela

    #1226862

    Hey bts-de,

    Please provide a link to the site/page in question so we can look into this issue further.

    Best regards,
    Jordan Shannon

    #1226916

    Hi 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,
    Ela

    #1227963

    Hi,
    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,
    Mike

    #1228046

    Hi 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

    #1228054

    Hi,
    You would place it at the end. Would you like us to take a look?

    Best regards,
    Mike

    #1228238

    Hi 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, ela

    #1228288

    Hi,
    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,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.