• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How do you add text to the bottom of category and tag archive pages (metro pro)

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › General Genesis Framework Discussions › How do you add text to the bottom of category and tag archive pages (metro pro)

This topic is: not resolved

Tagged: archive, category page, Metro Pro, tags page

  • This topic has 7 replies, 2 voices, and was last updated 11 months, 3 weeks ago by Brad Dalton.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • April 2, 2022 at 12:49 pm #504933
    billycoin
    Participant

    I am trying to add text to the bottom of my category and tag pages after the posts excerpts. So i have 20 posts per archive page displayed, at the end of these 20 post excerpts, i would like to have some text as an outro. So basically the posts in an archive are sandwiched between some intro text (which i can do) and some outro text (which i can not do)

    Very sorry if this has been covered but after 2 days of trying and failing to use advanced custom fields plugin and genesis hooks to hook in to the right part of the template i figured i must be missing an easy solution.

    I am trying to simply add a unique block of text at the bottom of my category and tag pages after the post excerpts. Similar to how the intro text block can display text before the posts loop on individual category and tag archive pages, i want to have "outro" text as well.

    Can anyone help me achieve this?

    thanks in advance

    https://everycasinobonus.com/tag/norway-casino/
    April 2, 2022 at 4:28 pm #504934
    Brad Dalton
    Participant

    Try this with a conditional tag https://wpsites.net/genesis-hooks/#custom-function

    or

    Use custom fields


    Tutorials for StudioPress Themes.

    April 3, 2022 at 9:55 am #504944
    billycoin
    Participant

    Hi Brad

    Thank you for taking the time to try and help me out 🙂

    I read your articles and guides, but with my minimal coding knowledge, i was not able to make this work for me. But i do understand from reading your guides that i need to hook into the genesis_before_footer hook, which i can do with simple hooks.

    I am able to create a custom field with advanced custom fields plugin - https://www.advancedcustomfields.com/ - to give me a wysiwyg editor on both tag editor and category editor pages within wordpress. I add my content to this editor then add the code from the advanced custom fields documentation page - https://www.advancedcustomfields.com/resources/code-examples/ -

    <p><?php the_field('field_name'); ?></p> (replacing 'field_name' with my category or tag name)

    also this code which a friend of mine uses and works in his (non genesis)theme in his archive.php file

    <p>
    <?php echo get_field('extra', 'category_' . $cat);?>
    </p>

    and also i tried this code

    <?php

    if(get_field('field_name'))
    {
    echo '<p>' . get_field('field_name') . '</p>';
    }

    ?>

    and checked the box to execute php on this hook, but nothing showed up. Is there an action or filter i need to add to my functions to show this or let this code execute in that hook?

    Also, is there a way to add this code to a archives.php or category.php genesis file if this would work better?, it seems the genesis theme files are a minefield for someone with limited coding knowledge.

    lastly, if all else fails, would you suggest paying a wordpress developer, perhaps someone on fiverr? i imagine this a fairly straight forward job for a wp developer?
    what are your thoughts
    thanks for continued help, i appreciate it

    April 3, 2022 at 10:55 am #504945
    Brad Dalton
    Participant

    You can use the code in a archive.php or tag.php and category.php template

    Or

    In your child themes functions file with a conditional tag.

    If you can't work out how to write the code, there might be a plugin in the WordPress repo which does the job.


    Tutorials for StudioPress Themes.

    April 3, 2022 at 11:28 am #504946
    billycoin
    Participant

    Hi, i did read this article this morning and it looked to be something that would work, but the problem i have is locating the category.php, tag.php and archive.php with this theme (metro pro)

    I was able to find in the genesis parent theme (which they strongly advise to not edit) in genesis/lib/structure/archive.php but this does not look like a regular archive.php or category.php that my limited knowledge of these files remembers. It is full of calls to action and looks highly breakable to insert php code into.

    usually with themes i use i can see the category and tag php files in the theme ediotr within wordpress and i could insert the code like this
    (image of friends category.php (non genesis theme) using advanced custom fields code)
    Screenshot-2022-04-03-at-18-22-31

    here is the category/ archiev .php from another theme i use (point theme)
    ss2

    this again would be where i add the code. but the problem i seem to have is locating this with the genesis parent theme and the metro pro theme.

    Can you shed more light? please

    thank you

    April 3, 2022 at 9:28 pm #504948
    Brad Dalton
    Participant

    You will need to create your own archive or category or tag template file(s) in your child theme. This requires coding knowledge.


    Tutorials for StudioPress Themes.

    April 4, 2022 at 2:15 am #504950
    billycoin
    Participant

    thanks for your help brad

    April 4, 2022 at 3:03 am #504951
    Brad Dalton
    Participant

    You're welcome.


    Tutorials for StudioPress Themes.

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

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble