[Resolved] Is this a “dummy” approach? Creating 150 “headers”

Home Forums Support [Resolved] Is this a “dummy” approach? Creating 150 “headers”

Home Forums Support Is this a “dummy” approach? Creating 150 “headers”

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1387625
    Henry

    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!

    #1387963
    David
    Staff
    Customer Support

    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.

    #1387993
    Clive

    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)

    #1388053
    Henry

    Thanks, David and Clive – very useful.

    #1388068
    Henry

    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?

    #1388393
    Leo
    Staff
    Customer Support

    I’d say 50 is fine ๐Ÿ™‚

    #1388832
    Henry

    Thanks, Leo…just want to be sure!

    #1388856
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

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