[Resolved] Display a phrase above the logo

Home Forums Support [Resolved] Display a phrase above the logo

Home Forums Support Display a phrase above the logo

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2323393
    twarrior

    Hello,

    Some time ago I asked a question about how to put the Tagline above the logo, and the solution worked… (until now 😉
    https://generatepress.com/forums/topic/display-the-tagline-above-the-logo/

    Now the problem is that we need that sentence above the logo to have a specific style (each word goes in a different colour).

    <span style="colour: #fff;">first part</span> <span style="colour: #1C9FAD;">second part</span>.

    The solution of inserting in the “tagline” field of wordpress that code works, but when displaying the Tagline in the Title of the Web (browser tab, Google results, etc.) it comes out with the code.

    So, what is your solution? Is it possible to insert that formatted text on top of the logo using Hooks?

    thanks

    #2323521
    David
    Staff
    Customer Support

    Hi there,

    you would need to hook in the HTML instead using this PHP Snippet:

    add_filter( 'generate_site_description_output', function() {
        return sprintf(
            '<p class="site-description"%s>
                Your custom tagline
            </p>',
            'microdata' === generate_get_schema_type() ? ' itemprop="description"' : ''
        );
    } );

    Replace the Your custom tagline with your HTML.

    #2323745
    twarrior

    WORKS GREAT

    thaaaanks

    #2323761
    David
    Staff
    Customer Support

    Glad to hear that!

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