WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] Adding a logo to the footer (11 posts)

  1. Ithril
    Member
    Posted 1 year ago #

    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.

  2. ElectricFeet
    Member
    Posted 1 year ago #

    See the FAQ "edit the copyright info".

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

  3. Ithril
    Member
    Posted 1 year ago #

    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.

  4. ElectricFeet
    Member
    Posted 1 year ago #

    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>

  5. Ithril
    Member
    Posted 1 year ago #

    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?

  6. nikeo
    Member
    Theme Author

    Posted 1 year ago #

    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

  7. Ithril
    Member
    Posted 1 year ago #

    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

  8. ElectricFeet
    Member
    Posted 1 year ago #

    ...
    	<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.

  9. Ithril
    Member
    Posted 1 year ago #

    @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

  10. Andrew
    Forum Moderator
    Posted 1 year ago #

    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.

  11. Ithril
    Member
    Posted 1 year ago #

    @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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.