Site logo

Archived topic

Is this a "dummy" approach? Creating 150 "headers"

7 replies · Started by Henry on August 4, 2020

Viewing posts 1–8 of 8

I need to create unique content and headers on archive pages...

As we know, Gutenberg doesn't work on archive pages, i.e. the ability to add content, media, and blocks on the actual archive pages.

GeneratePress of course has a very nice workaround: the ability to create a layout, header, and hooks that connect to those archive pages so all good and easy.

One thing though, I need 150 "hooks"...is that going to be a heavy burden on the server, or can GeneratePress speedily connect hooks to pages?

Said another way, is there a "recommended limit" to the number of headers and hooks that we "ought" to use?

Thanks!

Hi there,

every conditional function added to your site is going to have some impact on the server - to what extent 150 hooks would have i am unsure of but it would probably be a noticeable impact.

I think the bigger issue could be maintenance.
Maybe a dynamic approach using Custom Fields may be a better solution. Have you looked at Advanced Custom Fields ? This could be used to 'add' your extra content to a category which could then be displayed using a single hook.

Henry,

Another idea for you. I've accomplished something similar for a directory site using page templates.

Simply make one "master" page template, and then create customised copies of this for each individual archive page you need (in my project, each individual archive page had a different header, content and was themed differently to the main site)

It didn't take much more time to do this, and should be lighter on server resources (especially if using caching)

Thanks, David and Clive - very useful.

I mean, I have one header hook per US State (50 in total).

It's not the end of the world right? The ACF suggestion (thanks David) is good but it still requires a lot of code and content unique to each category to be written...

I ran a test and scored 50 on mobile (I can improve with some unrelated things to this particular question) and 93 on desktop...

Anyways, probably not that serious a deal?

I'd say 50 is fine :)

Thanks, Leo...just want to be sure!

No problem :)

This archived topic is closed to new replies.