0

My Path: C:\Users.......\Desktop......\coding\font-awesome-4.7.0\css

my header code:

GTCoding
<div id="slideout-menu">
    <ul>
        <li>
            <a href="<?php echo site_url(''); ?>">Home</a>
        </li>
        <li>
            <a href="<?php echo site_url('/blog'); ?>">Blog</a>
        </li>
        <li>
            <a href="<?php echo site_url('/projects'); ?>">Projects</a>
        </li>
        <li>
            <a href="<?php echo site_url('/about'); ?>">About</a>
        </li>
        <li>
              <input type="text" placeholder="Search Here">
        </li>
    </ul>
</div>

<nav>
    <div id="logo-img">
        <a href="#">
            <img src="<?php echo get_template_directory_uri(); ?>/img/logo.png" alt="GTCoding Logo"> 
        </a>
    </div>
    <div id="menu-icon">
        <i class="fa fa-bars"></i>
    </div>
        <ul>
            <li>
                <a href="<?php echo site_url(''); ?>"
                    <?php if(is_front_page()) echo 'class="active"' ?>
                >Home</a>
            
            </li>
            <li>
                <a href="<?php echo site_url('/blog'); ?>"
                <?php if(get_post_type() == 'post') echo 'class="active"' ?>
                >Blog</a>
            </li>
            <li>
                <a href="<?php echo site_url('/projects'); ?>"
                <?php if(get_post_type() == 'project') echo 'class="active"' ?>>Projects</a>
            </li>
            <li>
                <a href="<?php echo site_url('/about'); ?>"
                <?php if(is_page('about') == 'post') echo 'class="active"' ?>
                >About</a>
            </li>
            <li>
                <div id="search-icon">
                    <i class="fa fa-search"></i>
           
                </div>
            </li>
        </ul>
    </div>
</nav> 

<div id="searchbox">
    <input type="text" placeholder="Search Here">
</div> 

<?php if(is_front_page()); { ?>
   <main> 
<?php } ?>
  • Welcome to WPSE. To include FA you should look into enqueueing custom styles. Rather than just editing the header, you enqueue using functions.php to ensure that your stylesheet gets added at the right place. FA is more than just one stylesheet though so you might want to consider just using an FA WP plugin that handles all the @font-face etc. for you. – WebElaine Jul 29 at 13:14
  • How do I do that? – Emmanuel Ifeanyichukwu Jul 29 at 13:29
  • Search for Font Awesome on the plugin repo: wordpress.org/plugins – WebElaine Jul 29 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.