[Support request] How to add content on Portfolio Archive Page that doesn’t repeat

Home Forums Support [Support request] How to add content on Portfolio Archive Page that doesn’t repeat

Home Forums Support How to add content on Portfolio Archive Page that doesn’t repeat

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #2376701
    Lina

    I am trying to write a container of content on the Portfolio Archives Page that doesn’t repeat for every single portfolio piece, which is what is happening now.

    I’m obviously not adding it in the same container, so it can’t be that.

    #2376722
    Ying
    Staff
    Customer Support

    I am trying to write a container of content on the Portfolio Archives Page that doesnโ€™t repeat for every single portfolio piece, which is what is happening now.

    Do you mean the text “Some samples are….”?

    Where do you want it to appear?

    #2376737
    Lina

    Yes, that text.

    I would like it to appear only once…like a sort of preamble, at the top, before all the portfolio thumbnails.
    But whether I put it in a container, not a container… doesn’t matter… it repeats for each thumbnail.

    #2376749
    Ying
    Staff
    Customer Support

    That’s expected behavior if you add the text to the block element - content template.

    You will need to create another block element, add the text, choose hook as element type and before_main_content as hook name, set the CPT archive as the location.

    #2377399
    Lina

    Ahhhh, thank you so much, I understand now. I’ve created another content template with a Hook, and it’s working wonderfully.

    One more question please: on the Portfolio Archive Page, this title of “ARCHIVES: PORTFOLIOS” appears. I don’t want it there, but I don’t know where it comes from. If you look at my Element for the Archives Content Template, that title doesn’t even appear there. What am I missing?

    #2377411
    David
    Staff
    Customer Support

    Hi there,

    you can use this PHP snippet to remove the Archive Title:

    
    add_action('wp', function() {
    	remove_action( 'generate_archive_title', 'generate_archive_title' );
    });
    #2377423
    Lina

    Hi, David.

    Here’s the thing: that works perfectly, but it seems to also remove the content I was trying to put on that page in the first place.

    Hmmm Not sure how to get around that. I put the PHP code in a code snippet, and when I inactivate it, content appears. When I activate it again, content disappears.

    You can see the two screenshots below.

    #2377428
    Lina

    Oh, wait! The content is appearing… it’s just that it’s underneath the Portfolio thumbnails ๐Ÿ™‚
    I mean literally, underneath. Layered under them.

    #2377432
    David
    Staff
    Customer Support

    Is it possible to see the page ?

    #2377434
    Lina

    For sure

    #2377439
    David
    Staff
    Customer Support

    Nice ๐Ÿ™‚ The element you’re using to Hook in the title and description. Can you change its Hook to before_main_content or after_header

    Currently where its hooked in is inside the columns container and the masonry script don’t like it ๐Ÿ™‚

    #2377707
    Lina

    Hi David,

    The plot thickens.

    It was set on before_main_content before.

    Now I’ve changed it to after_header. It works on my desktop, but on any browser I’ve tried on my phone, the text still appears underneath the Portfolio thumbnails.

    If I change it back to before_main_content, the text goes back to appearing underneath the Portfolio Thumbnails, both on desktop and mobile.

    #2377726
    Lina

    No, I was mistaken. What’s happening on mobile is that it doesn’t even register any changes I make on the hook page. I tried changing some text on that page, and it appears on desktop, but not mobile.

    I feel like I’ve fallen in the rabbit-hole in Wonderland ๐Ÿ™‚ I’m totally lost on this one.

    #2377745
    David
    Staff
    Customer Support

    Can you try clearing the browser caches on the mobile device.
    If it still shows the incorrect result, clear any plugin caches, and connect to a different network on the mobile ( in case the Router or ISP is caching )

    #2377785
    Lina

    Okay David, I’ve tried all of this. I even installed a couple of brand new browsers on my phone.

    I went next door and tried a friend’s phone and ipad as well, both on wifi and on cellular data, and the same thing happens.

    I put a dash after the last word on the content, and I can clearly see that that dash appears on desktop, but not mobile. Really weird.

Viewing 15 posts - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.