- This topic has 52 replies, 3 voices, and was last updated 1 month, 3 weeks ago by
David.
-
AuthorPosts
-
February 1, 2023 at 4:51 am #2516902
Jusung
Hello!
When you see this page on the link,
you can see 5 buttons, which are All, SEO, Anaysis, Ads, Globalization.
It indicates category.So, when the button is clicked, I only wanna show the posts that in the category that is clicked.
I can think that I make 5 same pages, but shows posts in different categories.
Is this only way to make this or is there a way to make this in one page?Thank you always!
February 1, 2023 at 8:55 am #2517250David
StaffCustomer SupportHi there,
i would have each of those buttons link to your post category archive.
And then use a Block Element – Loop Template for your Query Loop block:https://docs.generatepress.com/article/block-element-loop-template/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 1, 2023 at 9:49 pm #2517896Jusung
It is complicated.
When I make Loop Template, I can’t set hook-after header, which means the merged header is gone..Also, since the button is 5, am I supposed to make 5 block elements?
February 1, 2023 at 10:13 pm #2517913Fernando Customer Support
Hi Jusung,
What David suggests is to display the Block Element you have for the Buttons on archive pages, and link each button to the default created archive pages.
Then, for the archive pages, use a Block Element – Loop Template to style the posts.
Make sure to enable “Inherit Query from Template” option in the Loop Template.
February 2, 2023 at 12:11 am #2518108Jusung
Sorry. I don’t understand…
I have made a page(portfoilo). You are saying I have to make (location: All archives) not page:portfolio?
and links all the bettons to the the page(location: All archives)?and I have to make a block (loop template)
I really don’t understand how this works..
February 2, 2023 at 12:40 am #2518133Fernando Customer Support
It’s actually just a suggestion. What you had in mind is alright as well.
What we were referring to is using the default archive pages instead of creating new pages.
Can you provide admin login credentials so we can take a closer look at your setup?
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
February 2, 2023 at 12:45 am #2518137Jusung
I just created a new user to edit.
I want to follow your suggestion since my way doesn’t look good.
February 2, 2023 at 1:34 am #2518179Fernando Customer Support
Can you change the user to an admin?
February 2, 2023 at 1:37 am #2518185Jusung
Just changed it to admin.
February 2, 2023 at 1:52 am #2518206Fernando Customer Support
1. Create a new Block Element – Hook but only keep this Container and its content: https://share.getcloudapp.com/eDunDKAl
2. Set the Block Element “Portfolio Page” to only appear on the Portfolio page.
3. Create a Block Element – Loop template. Assign it to display on the 5 category archive pages. Add a Query Loop. Make sure to enable “Inherit Query from Template” option in the Loop Template settings.
This should fix your structure.
February 2, 2023 at 5:35 am #2518448Jusung
I have done what you said, but it doesn’t work.
I don’t understand how the archive can be shown up on the portfolio page..I also added the link on the button, but when I click it, it directs me to blog..
February 2, 2023 at 8:04 am #2518708David
StaffCustomer SupportEach link has to point to the relevant archive page
eg.
https://your_domainname/category/all/po-analysis/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 2, 2023 at 5:33 pm #2519198Jusung
Yes. I have given the right link to each button.
but when I click it, it directs me to the blog page, not portfolio..
I think I need to change the location setting on blog and portfolio content.
February 2, 2023 at 5:44 pm #2519212Fernando Customer Support
Yes, that’s the correct setup.
You just need to replace the display rule location of the Portfolio Head Element as such: https://share.getcloudapp.com/Z4um8LWp
Add the other category archive pages as well to the display rule location.
February 2, 2023 at 6:37 pm #2519231Jusung
I changed it as you said.
However, I can see the right sidebar that I want to remove.
Also, I can’t see the merged head…On my blog,
Blog
Search Results
Post Category: Content Marketing [SEO]
Post Category: Performance Marketing
Post Category: Advertising Strategy
Post Category: International MarketingOn the portfolio head
Post Category: All
Post Category: po-SEO
Post Category: po-Analysis
Post Category: po-Ads
Post Category: po-GlobalizationOn the portfolio content
All ArchivesThese are what is set..
I think this is really complicated to me cuz there is no sidebar on portfolio and there is a sidebar on blog..
-
AuthorPosts
- You must be logged in to reply to this topic.