- This topic has 11 replies, 3 voices, and was last updated 1 year, 11 months ago by Tom.
November 6, 2019 at 9:07 am #1055048Samuel
I looked into this for hours and can’t find a way to customize my archive.php file as needed.
I need my category pages to look like a classic page with :
1 / Hero Header with Title and featured image.
2 / A content part that I can edit to put some text to explain what this category is about and where I can add a shortcode to display all posts of this category with filter (I use “The Grid” plugin to do that).
Is there a way to customize archive.php to display like page.php backend and frontend ?
I tried to copy my page.php file and plage it on my Child Theme and rename it archive.php but obviously it does not work… I really don’t know nothing about PHP and I’m just following step by step tutorials to modify things when needed.
1 / Regarding Header
I tried to use Element to customise Header of “All archives” but nothing happened. Even just a color change attribute. So it’s weird but anyway there is no option to put a featured image on category backend, so I think Element can’t do more about this ?
2 / Regarding Content
There is a “description” field that is not displaying frontend. But maybe there is a way to display it ? In that case it could be a solution to solve part of the problem BUT I would need to be able to style the text and display my shortcode in it… w
Could you help me with all this ?
My website is actually running on local.
Thanks a lot !
SamuelNovember 6, 2019 at 3:53 pm #1055382DavidStaffCustomer Support
may be simplest for you to redirect category archives to a static page, then you can do as you please with the content. This article explains how to do that:November 7, 2019 at 3:27 am #1055685Samuel
Thanks David, I was thinking about that very simple idea indeed ! But I was wandering if it has no side effects regarding SEO or “Google undestanding”. Anyway I think I will follow your advise.November 7, 2019 at 5:02 am #1055786DavidStaffCustomer Support
No side effects SEO wise as any Category links will redirect to your custom archive page which is what will get indexed by Google.
The only ‘negative’ is you have to build them manually for each category and make sure slugs match. So a little more hands on.November 7, 2019 at 5:09 am #1055797Samuel
Thanks David !November 7, 2019 at 5:14 am #1055802DavidStaffCustomer SupportDecember 6, 2019 at 11:09 am #1096247Samuel
Hello back ! I was wondering if same feature was possible with tags ? Thanks for your helpDecember 6, 2019 at 8:07 pm #1096592TomLead DeveloperLead DeveloperDecember 7, 2019 at 1:05 am #1096721Samuel
Hi Tom, thanks for your reply, this is sadly not working, I will have to make all my tags to be categories, do you know if there is a hook to do so automatically or do you recommend to handly redirect 301 every one of it ?December 7, 2019 at 9:44 am #1097170TomLead DeveloperLead DeveloperDecember 8, 2019 at 3:00 am #1097619Samuel
It’s working ! Thanks TomDecember 8, 2019 at 10:09 am #1097953
- You must be logged in to reply to this topic.