[Resolved] Marketer Site Logo Question

Home Forums Support [Resolved] Marketer Site Logo Question

Home Forums Support Marketer Site Logo Question

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1599638
    Sonja

    Hello,

    if I use the Marketer Site, there is the word “Marketer” as a logo. Is it possible to put there two words with different colors for each?

    #1599705
    David
    Staff
    Customer Support

    Hi there,

    Site Title 2 colors would require some PHP to output the required HTML to change parts of it to two colors. Try adding this PHP Snippet

    add_filter( 'generate_site_title_output', function( $output ) {
        $titleHTML = 'My title <span class="site-title-accent">with custom style</span>';
        return sprintf(
            '<%1$s class="main-title" itemprop="headline">
    	<a href="%2$s">%3$s</a>
    	</%1$s>',
    	( is_front_page() && is_home() ) ? 'h1' : 'p',
    	esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ),
    	$titleHTML
        );
    });

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Then you can style it with some CSS:

    .main-title .site-title-accent {
        color: #f00;
    }
    #1599718
    Sonja

    Thanks David,

    I will try this out.

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