WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
Logos in Menu Bar (4 posts)

  1. María Silvia
    Member
    Posted 9 months ago #

    Hello!

    Is it possible to put five logos in the menu bar, instead of the social icons? How can I do it? My site is: http://plasticabariatrica.com The html of the logos is:

    [corrupted code removed - please use the code buttons when posting code]

    Thank you in advance

    María Silvia

  2. María Silvia
    Member
    Posted 9 months ago #

    I repeat my question, trying to explain well.

    Is there any way to insert four logos on the menu bar, in the place that is booker for "social icons"? I do not want to appear below the logo, but to display flush left, above the Top Menu links within the menu box.
    If this is possible, I want each logo has a link to the website of the medical societies representing each.

    My website es: http://plasticabariatrica.com

    thank you very much for your help.

    María Silvia

  3. rdellconsulting
    Member
    Posted 9 months ago #

    Here's a treat - my first php Filter! It works for me so I hope it does for you too.

    Put your images in a directory (eg /wp-content/uploads and change the $img1 - $img5 names below.

    Add this code to a Child Theme functions.php:

    // display Images:
    add_filter('tc_social_in_header', 'replace_si_with_images');
    function replace_si_with_images($resp) {
    	$img1 = esc_url( home_url().'/wp-content/uploads/logo20x20.png' );
    	$img2 = esc_url( home_url().'/wp-content/uploads/logo20x20.png' );
    	$img3 = esc_url( home_url().'/wp-content/uploads/logo20x20.png' );
    	$img4 = esc_url( home_url().'/wp-content/uploads/logo20x20.png' );
    	$img5 = esc_url( home_url().'/wp-content/uploads/logo20x20.png' );
    
    	//class added if not resp
    	$class 		=  ('resp' == $resp) ? '':'span5'
    	?>
    		<div class="social-block <?php echo $class ?>">
    			<?php if ( 0 != tc__f( '__get_option', 'tc_social_in_header') ) : ?>
    	       		<img class="social-icon si-image" src="<?php echo $img1?>" width="20" height="20" />
    	       		<img class="social-icon si-image" src="<?php echo $img2?>" width="20" height="20" />
    	       		<img class="social-icon si-image" src="<?php echo $img3?>" width="20" height="20" />
    	       		<img class="social-icon si-image" src="<?php echo $img4?>" width="20" height="20" />
    	       		<img class="social-icon si-image" src="<?php echo $img5?>" width="20" height="20" />
    	       	<?php endif; ?>
    		</div><!--.social-block-->
    	<?php
    }

    If you need to add any CSS styling, an example might be:
    .si-image {margin-right: 10px;}

  4. LEGRANINAT
    Member
    Posted 9 months ago #

    Dear all

    How did tou change the circle icon of the pages (for images) in another layout ??

    Many thanks `
    Nathalie

Reply

You must log in to post.

About this Theme

About this Topic