Tagged: x
-
AuthorPosts
-
April 6, 2016 at 1:27 pm #869813
Hello,
I followed the following steps to upload the child theme found here: https://community.theme.co/kb/how-to-setup-child-themes/
I would like to know how to access the functions.php file so I can activate the font awesome library in order to add icons to my menu bar.
I’m new to X Theme and WordPress and can’t figure this out…
Thank you in advance!
Jacob
April 6, 2016 at 2:01 pm #869871You will need to access your child theme via FTP and create the file in your Child Theme. The functions.php file is not already in the Child Theme and you can add it manually. For more detailed information please kindly read this article: https://codex.wordpress.org/Functions_File_Explained
Hope it helps 🙂
April 6, 2016 at 9:23 pm #870407Thank you for the reply! I was able to access the functions.php file and I added the following code:
function my_custom_head_output() {
?>
<link href=”//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css” rel=”stylesheet”>
<?php
}
add_action( ‘wp_head’, ‘my_custom_head_output’, 99999 );The code comes from: https://community.theme.co/forums/topic/updating-font-awesome/
I then transferred the saved functions.php file into the child theme and then through FTP to my host file manager.
When I type fa fa-home in my menu css classes and then save the menu, it doesn’t show the home icon.
Do I need to input that somewhere else or change the code? The link I got the code says it can be used like <i class=”fa fa-camera-retro fa-lg”></i> but I’m not sure where to put that either.
Where do I input fa fa-home?
Thank you!
Jacob
April 7, 2016 at 3:28 am #870758Hi Jacob,
That code should work unless you’re using prettyquotes.
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
April 7, 2016 at 10:12 am #871350This reply has been marked as private.April 7, 2016 at 9:59 pm #872229Hello There,
The given ftp credentials is not working for us. Please double check the username and password. For the meantime, could please post in your reply below the actual contents of your child theme’s functions.php file?
Thank you.
April 8, 2016 at 12:24 am #872346This reply has been marked as private.April 8, 2016 at 9:38 am #872916Hi Jacob,
You need to add it in your child theme’s functions.php file. It’s located in wp-content/themes/x-child/functions.php
The code you posted is from the main xtheme functions.php file.
With regards to adding icons to your menu, you can add the icon code directly in your navigation label
eg. I added <i class="x-icon x-icon-home" data-x-icon="" aria-hidden="true"></i>
http://screencast.com/t/mZC58vwZ
Hope that helps
April 8, 2016 at 10:50 am #872990Thank you for the help! If I want to use different icons how do I find the attribute that goes in the quotes in data-x-icon=””? I tried replacing “home” with “envelope” for the contact icon but it still came up as the home icon.
April 8, 2016 at 11:17 am #873019I found the cheatsheet 🙂 https://fortawesome.github.io/Font-Awesome/cheatsheet/
Another question: How do I change the font color in the menu bar? Is there css code I can add to the Custom>Edit Global CSS to do that?
Thanks again!
April 8, 2016 at 11:20 pm #873703Hello There,
Thanks for writing in!
You can change the navigation menu font color from Appearance > Customize > Links Text > Navbar links.
Thanks.
April 11, 2016 at 1:37 pm #876958Thank you for the help 🙂
April 12, 2016 at 12:46 am #877691You are welcome!
Glad that it helped. Feel free to let us know if you face any other issue. We’ll be happy to assist you.
Thanks for using X.
Cheers!
June 13, 2016 at 12:46 pm #1040009I finally figured it out through this resource: https://wordpress.org/support/topic/how-to-add-codes-in-functionphp.
June 13, 2016 at 1:15 pm #1040055You are welcome!
-
AuthorPosts