• Pernilla

    (@pernilla)


    Hi!
    I’m trying to add a div containing social media icons in my nav bar.
    Nav items to the left and the social media to the right of them.
    I have a child theme and I’ve been trying to insert them. I made a div which just has the text “test” in it and it’s showing up, not in the right spot though. But — when I add the icons they’re not displaying on my site. When I refresh the site it pops up for a fraction of a second and then disappears. What am I doing wrong? Any help would be much appreciated. I’m not very familiar with php so I’m sure I’m missing something.
    Here’s my code:

    <div class="wrapper">
    
    			<!-- container -->
    
    			<div class="container">
    
    				<!-- header -->
    
    				<div id="header">
    
    				  <div class="site-title1">
    
    						<?php if(isset($logo)){ ?>
    
    							<a href="<?php echo home_url(); ?>" class="logo"><img src="<?php echo $logo; ?>" alt="<?php echo $title; ?>"></a>
    
    						<?php } ?>
    
    						<!--
                            <div>
    
    							<a href="<?php echo home_url(); ?>"><h1><?php echo $title; ?></h1></a>
    
    							<p><?php echo $description; ?></p>
    
    						</div>
                            -->
    
    					</div>
    
    					<?php 
    
    						$items_wrap = '<nav><ul id="nav-menu1">%3$s</ul></nav>';
    
    						$nav_args = array(
    
    							'theme_location'  => 'header',
    
    							'menu'            => '',
    
    							'container'       => false,
    
    							'container_class' => '',
    
    							'container_id'    => '',
    
    							'menu_class'      => false,
    
    							'menu_id'         => '',
    
    							'echo'            => true,
    
    							'fallback_cb'     => '',
    
    							'before'          => '',
    
    							'after'           => '',
    
    							'link_before'     => '',
    
    							'link_after'      => '',
    
    							'items_wrap'      => $items_wrap,
    
    							'depth'           => 0,
    
    							'walker'          => ''
    
    						);
    
    						wp_nav_menu( $nav_args );
    
    					?>
    
    		<div id="socialmedia"><img src="images/pinterest.png" width="30" height="30" alt=""/> test </div>
    
    	</div>
  • The topic ‘Add social media icons to nav bar’ is closed to new replies.