Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #988860

    Hello i have a problem. I have 7 categories with there own logo. So i Made a template and place on the top a $logo var. and place pull this in the page but that didn’t work is there a solution for my problem? I want to select an template and the richt logo is vorming up

    #988871

    Hey MarcusEls,

    Have you tried just manually putting the logo image directly in your custom template file?

    Best regards,
    Jordan Shannon

    #988874

    i realy don’t understand your construct – but you can change logo for pages , categories , posts, etc if you know something about conditional phrases in wordpress.

    a single post got a categorie – if you like to change all logos for single post with a given category use

    add_filter('avf_logo','av_change_logo_for_categories');
    function av_change_logo_for_categories($logo){
        if( is_single() && in_category( 'slider1' ) )  {
        	$logo = "https://webers-testseite.de/wp-content/uploads/layerslider/Parallax-Slider/truc.png"; 
        }
        return $logo;
    }

    you can modify this with a lot of elseif rules and for pages , page arrays etc. pp like:

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo){
        if( is_page(21) ) {
            $logo = "http://www.domain.com/wp-content/uploads/logo21.jpg"; 
        }
      
        elseif ( is_page( array( 42, 54, 6 ) ) ) {
            $logo = "http://www.domain.com/wp-content/uploads/logo22.jpg"; 
        }
    
        elseif ( is_category( 'slider1' ) )  {
            $logo = "http://www.domain.com/wp-content/uploads/logo23.jpg"; 
        }
    
        elseif( is_single() && in_category( 'slider1' ) )  {
            $logo = "http://www.domain.com/wp-content/uploads/logo24.jpg"; 
        }
        return $logo;
    }

    all single posts with category: slider1 will get logo24
    if you got a list of posts of category slider1 ( has_category) logo23

    #988902

    by the way dear Mods why doesn’t this do the job if i want to proof if a portfolio has “frontside” category ???

    elseif ( is_singular( 'portfolio' ) && has_term( 'frontside', 'portfolio')  )  {
            $logo = "https://webers-testseite.de/wp-content/uploads/unmute.png"; 
        }
    #988983

    Hi,


    @Guenni007
    I’m not sure why that happens, I need to test this method but that might take some time.

    However, we can use header widgets and add multiple logos easily. Please check out the enfold documentation.

    Best regards,
    Vinay

    #988984

    well i understand this : Hello i have a problem. I have 7 categories with there own logo that he likes to change the logo for each category. – and not to have multiple logos

    #988998

    Hi,

    Ah! yeah could be, I did not understand the requirement correctly.

    To display a category based logos it is best to use the custom script.

    Best regards,
    Vinay

    #989059

    Thanks, the solution of Jordan I have followed and is the best to explain to my client how it works. also every category has his own color don’t no of this is possible

    • This reply was modified 6 years, 3 months ago by MarcusEls.
    #989158

    Hi,

    Glad we could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    Don’t forget to bookmark Enfold Documentation for future reference.

    Thank you for using Enfold :)

    Best regards,
    Vinay

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Morw than one logo’ is closed to new replies.