WordPress.org

Support

Support » Themes and Templates » [Resolved] Adding a logo to the footer

[Resolved] Adding a logo to the footer

  • Hello everyone, is it possible to change the credit link for a logo image¿?
    I would like to add a logo in the “designed by” line.

Viewing 10 replies - 1 through 10 (of 10 total)
  • ElectricFeet

    @electricfeet

    See the FAQ “edit the copyright info”.

    Or rather, wait 5 minutes and I’ll update it with the 3.0.10 file names…

    I’ve already read the FAQ, but there’s no answer for what i’m trying to do or i’m not able to find it. I just want to swawp the link after “Designed by” for my logo with a link.

    ElectricFeet

    @electricfeet

    You need to add an html a/img tag to the copyright area. Syntax:
    <a href="yourlogo.jpg"><img src="yourlogo.jpg" alt="YourName" width="xxx" height="yyy" /></a>

    I may be doing something wrong cause i can’t make it work…

    This is the code i have in my class-footer-footer_main.php without editing it.

    '<a href="'.TC_WEBSITE.'">Themes & Co</a>'

    Can you please tell me where to put the code you provided me?

    Theme Author nikeo

    @nikeo

    Hi,
    Here is a code snippet to add your logo in the footer. It displaus your logo if you have uploaded one, otherwise it will keep the actual credit in footer.

    Copy this code in your functions file.

    add_filter( 'tc_credits_display', 'my_credits_display' );
    function my_credits_display($html) {
    	$logo_src    			= esc_url ( tc__f( '__get_option' , 'tc_logo_upload') ) ;
    	if ( empty($logo_src) )
    		return $html;
    	?>
    	<div class="span4 credits">
        	<?php
    	    	$credits =  sprintf( '<p> · © %1$s <a href="%2$s" title="%3$s" rel="bookmark">%4$s</a> · Designed by %5$s ·</p>',
    				    esc_attr( date( 'Y' ) ),
    				    esc_url( home_url() ),
    				    esc_attr(get_bloginfo()),
    				    '<img src="'.$logo_src.'" alt="'.esc_attr(get_bloginfo()).'">',
    				    '<a href="'.TC_WEBSITE.'">Themes & Co</a>'
    			);
    			echo $credits;
    		?>
    	</div>
    	<?php
    }

    Hope this helps

    Thanks for the help Nikeo, but it shows the same logo than the header i would like to use a different logo for the footer credits but my php skills are limited.

    I believe i can do it the way Electricfeet suggested but i guess i’m doing something wrong.

    Should this work if i add this on my class-footer-footer_main.php?.

    '<a href="myurl" target="_blank" <img src="../images/piedras.png" alt="YourName" width="30" height="30" /> '.TC_WEBSITE.'">My Name</a>'

    i’m not sure if the img src code is on the right place

    ElectricFeet

    @electricfeet

    ...
    	<div class="span4 credits">
        	<?php
    	    	$credits =  sprintf( '<p>&middot; Designed by <a href="myurl" target="_blank"><img src="../images/piedras.png" alt="YourName" width="30" height="30" /></a> &middot;</p>'
    			);
    			echo $credits;
    		?>
    	</div>
    ...

    will say: “· Designed by yourlogo ·” and will be clickable to myurl.

    @electricfeet it seems than i miss something cause using that code just makes my footer show the “alt” text but there’s no image :S

    The path i’m using is for the “../images” on my child theme

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    Right click on your page and click “View source”.
    Then search the code for “piedras.png”.
    Once you find it look at the file path and make sure you’re using the right path in the code.

    @andrew nevins thanks a lot it worked! i don’t know if it’s cause i’m testing it on wamp but i had to put the full path to the image file. Once i did that it worked. Thanks all of you for your time and your patience

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] Adding a logo to the footer’ is closed to new replies.