- This topic has 19 replies, 3 voices, and was last updated 5 months, 2 weeks ago by
David.
-
AuthorPosts
-
October 17, 2022 at 11:39 am #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.
October 17, 2022 at 12:15 pm #2376722Ying
StaffCustomer SupportI 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?
October 17, 2022 at 12:40 pm #2376737Lina
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.October 17, 2022 at 1:02 pm #2376749Ying
StaffCustomer SupportThat’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, choosehook
as element type andbefore_main_content
as hook name, set the CPT archive as the location.October 18, 2022 at 6:10 am #2377399Lina
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?
October 18, 2022 at 6:28 am #2377411David
StaffCustomer SupportHi there,
you can use this PHP snippet to remove the Archive Title:
add_action('wp', function() { remove_action( 'generate_archive_title', 'generate_archive_title' ); });
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 18, 2022 at 6:37 am #2377423Lina
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.
October 18, 2022 at 6:42 am #2377428Lina
Oh, wait! The content is appearing… it’s just that it’s underneath the Portfolio thumbnails ๐
I mean literally, underneath. Layered under them.October 18, 2022 at 6:45 am #2377432David
StaffCustomer SupportIs it possible to see the page ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 18, 2022 at 6:45 am #2377434Lina
For sure
October 18, 2022 at 6:50 am #2377439David
StaffCustomer SupportNice ๐ The element you’re using to Hook in the title and description. Can you change its Hook to
before_main_content
orafter_header
Currently where its hooked in is inside the columns container and the masonry script don’t like it ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 18, 2022 at 8:05 am #2377707Lina
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.
October 18, 2022 at 8:12 am #2377726Lina
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.
October 18, 2022 at 8:20 am #2377745David
StaffCustomer SupportCan 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 )Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 18, 2022 at 8:52 am #2377785Lina
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.
-
AuthorPosts
- You must be logged in to reply to this topic.