Home Forums Front-end Issues Text Fields on Frontend


Text Fields on Frontend

  • Hi there, first time posting so please be nice 🙂

    This is quite hard for me to explain, ill do my best.

    Using WooCommerce I am building a Computer Store. With ACF I have created a few fields within the Products. These are basically specs of the laptop/computer/hard-drive. CPU, Memory, Grade etc.

    I am using Generatepress, which allows me to create Hooks. Within the Element in GP I have created a Hook that outputs a UL, and the ACF Fields within these as Shortcode. I can then tell GP where to display these hooks.

    My issue is:

    I have had to create a separate UL Hook to apply to certain categories. For example, I have posted a SSD Hard Drive, which obviously has different specs to a Laptop (no processor etc).

    With Generatepress Hooks, I am having to go into the Desktop Hook, and tell it to only display the “Desktop Spec” UL on desktop categories. If I chose “Entire Site” for all these Hooks I am making, it is displaying all my ACF Keywords, even when they are empty, which doesnt look very nice.

    GP Hooks allow PHP and not just HTML and Shortcode.

    Is there a way I can create the same UL list and be able to just create on Hook with all the ACF Fields in there, and it just omits them if they are blank, this way I can set the Hook to “Entire Site”.

    Some of the keys are item_grade, processor, memory. But there are quite a few!!

    The website is You can see the UL fields on the home page, and e.g desktop archive loop.

Viewing 1 post (of 1 total)

The topic ‘Text Fields on Frontend’ is closed to new replies.