Is it possible to make custom text in subcategory headers?

This topic has 7 replies, 3 voices, and was last updated 1 weeks, 5 days ago ago by Andrew Mitchell

  • Avatar: Goostaf
    Goostaf
    Participant
    May 3, 2024 at 08:47

    Hi, we have subcategory titles pulled from the titles, is it not possible to write them manually? Examples in private

    Please, contact administrator
    for this information.
    6 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    May 3, 2024 at 09:46

    Hi @Goostaf,

    Pleas copy the content-product-cat.php file from parent them to child theme under xstore-child/woocommerce/.

    After that look at the line 225, then add your custom text:

    
    <h4><?php echo esc_html($category->name); ?><?php if ( $styles_default['count_label'] && $category->count > 0 ) { echo ' <sup>('.$category->count.')</sup>'; } ?></h4>
    <?php echo 'Your Custom Text'; ?>
    

    Hope it helps!

    Avatar: Goostaf
    Goostaf
    Participant
    May 3, 2024 at 13:42

    I meant, not just a general text at the bottom, but so that each subcategory I can write its own text and it would be displayed instead of the standard title (crossed out on the screen), for example, instead of balls for New Year, I would write just New Year and so on for each subcategory their own headings.

    Because we have subcategories all named Birthday Balls, Birthday Balls, Anniversary Balls and all this stretches into the headers, but we do not want to change the names of the main, but at the level of headers in subcategories yes. I’ll try to make a video of what we want, maybe it’s realizable.

    Please contact administrator
    for this information.
    Avatar: Justin
    Luca Rossi
    Support staff
    May 3, 2024 at 16:17

    Hi @Goostaf,

    In this case, you just need to change the category name of sub-categories:

    https://prnt.sc/2v5bWxf1nuXc

    Or maybe we’re still not understanding what you want to achieve?

    Best Regards,
    The 8Theme Team.

    Avatar: Goostaf
    Goostaf
    Participant
    May 3, 2024 at 18:34

    All correct understanding, but I wanted to know if it is possible to change without changing the name of the category:) Maybe a hook of some kind can output its own text, instead of pulling the name of the category?

    Avatar: Justin
    Luca Rossi
    Support staff
    May 4, 2024 at 08:24

    Hi @Goostaf,

    Unfortunalte, there is no hooks available for the category title.

    Best Regards,
    The 8Theme Team.

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    May 5, 2024 at 12:03

    Dear Goostaf,

    We trust our theme is enhancing your experience. Taking a brief moment to rate it with a glowing 5 stars on ThemeForest would be immensely appreciated. Your feedback holds significant value for us.

    Click here to rate now: https://themeforest.net/downloads

    Thank you sincerely for your ongoing support!

    Best Regards,
    The 8Theme Team

  • Viewing 7 results - 1 through 7 (of 7 total)

The issue related to '‘Is it possible to make custom text in subcategory headers?’' has been successfully resolved, and the topic is now closed for further responses

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.