[Resolved] Secondary Title in Generatepress

Home Forums Support Secondary Title in Generatepress

  • This topic has 3 replies, 2 voices, and was last updated 4 months ago by Leo.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1295793
    Jason

    Hi there, I have used a plugin called Secondary Title to add a secondary title field, however what Iā€™m trying to do is place it inside an element which I am using as my header.

    I tried using {{custom_field.secondary_title}} but that did not work. The PHP they tell me to use in the theme is <?php echo get_secondary_title(); ?> ā€” Is there any way I could get the subtitle into an element (or another method that would allow me to do so)?

    I don’t mind switching plugins, or adding something to my child theme’s functions if that’s what is necessary.
    (It would be a bonus if the field appeared under the actual title instead of in the sidebar, but that’s not a big deal.)

    Thank you!

    #1295863
    Leo
    Staff
    Customer Support

    Hi there,

    If you just want to display it within the header element, then you should be able to just use a custom field without another plugin:
    https://docs.generatepress.com/article/header-element-template-tags/#custom_field-name

    #1295920
    Jason

    Oh!! I didn’t even realize that feature existed in WordPress. Nice! Does exactly what I need, thank you so much šŸ™‚

    #1296038
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.