Customize Enfold theme on my WP site - wordpress

I've to customize the header in Enfold theme of my WP site. I placed the company logo to the left and under this I placed the primary menu. I need to add another image near to the company logo. I 'created' a theme child and I would like to add a widget to place image on the right of the company logo but the theme expected in the header the company logo and the primary menu only. Can I customize my header to do this? Can you help me please? Thank's!

If you have purchased the enfold theme, you will get the child theme along with that. Your header part (menu and logo) is running from helper-main-menu.php file which is located at enfold/includes/helper-main-menu.php
Now to get this in child theme add the header.php to your child theme and then add a folder named includes and keep a copy of helper-main-menu.php. This should be as same as in parent theme.
Now you can edit your child theme files and add as many widgets you need.
I have tested and it worked for me.Happy Coding :)

I have noticed that your theme is from themeforest so you should create a child theme, then copy your header.php in child theme folder. Then make changes on that file.
For creating a child theme, make a folder inside your 'themes' folder with you child theme name. Now the child theme should have a style sheet in it which is a must. So add a style sheet and the beginning of the child theme style sheet should be as follows:
/*
Theme Name: (theme name) Child
Theme URI: (give URL)
Description: (give description)
Version: (give your version)
Author: (author name)
Author URI: (give URL)
Template: (name of parent theme)
*/
Of these the very important thing is the 'Template' which is the parent theme name. To avoid confusion take the name of parent theme from the parent theme style sheet.
Now the second thing is the functions of your child theme. Just add a php file with the name functions.php and place the below code.
<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
?>
This code is for enqueuing the parent theme styles. Here you go! your child theme will work now.

Related

Child themes of twentysixteen theme

I am using twenty sixteen child theme. I need to modify the theme contents. What are the files I need to modify and how? Can anyone explain it in detail.
Advance thanks.
when i use child theme like this i get black screen
This is my site http://i.stack.imgur.com/snSX9.png How to extent the full width of my site..
Read the following documentation about the child themes
Child theme inherits all the functionality and styling of it's parent theme. If you are using child theme and a theme update is applied your changes won't be lost or overwitten
You can quickly create child theme for any theme, just follow the steps given below:
1 Create a folder and name it exactly your theme name; append -child in the name. e.g. creating child theme for twentysixteen theme would be called twentysixteen-child this folder should sit beside parent theme under wp-content/themes/
2- Your child theme should have three files.
style.css
functions.php
screenshot.png
3- In functions.php file you can override parent theme functions.
4 In style.css file you can override parent theme CSS code.
5 If you want to change header design then you have to override header.php file. For this copy header.php file of your parent theme and paste it inside your child theme folder. Now, you can modify the child theme header file as per your requirements.
6 Similarly, you can also override footer.php file in your child theme.
For more info have a look over below thread-
https://codex.wordpress.org/Child_Themes
You need to create at-least one child-theme directory and two main files (style.css & functions.php) under child theme directory. I have given example using Twenty-Thirteen WordPress theme. Step by step explanation is given

Woocommerce Mystile Child Theme Not Displaying Correctly

I've created child themes before without issue however when I create one using Woocommerce Mystile theme it does not display properly with menu items missing and images resizing to be too large.
I made the child theme by creating a new folder in the wp-content>themes folder called mystile-child and creating style.css with the contents
/*
Theme Name: Mystile Child
Description: Mystile Child Theme
Template: mystile
*/
I then created a functions.php file with the contents
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?>
this is what the parent theme looks like:
This what the child theme looks like
Just out of curiousity - were the logo and other missing elements set up intially using the theme customizer (reached via the wordpress admin menu Appearance > Customize)?
If that's the case, then those settings are created outside of your theme and need to be reset or imported for your child theme. There are a few ways to accomplish this, the easiest way being with a plugin which imports/exports those Customizer settings.
Hope that helps,
Laura
Okay I fixed the problem following the advice found on Wordpress.org support forum here https://wordpress.org/support/topic/mystile-theme-child-header-problem
Seems more of temporary fix though and something that the people at Woocommerce should investigate.

About WordPress child theme

I have created wordpress child theme from parent theme "twentythirteen". My child theme name is "twentythirteen-child".It has following content.
/*
Theme Name: twentythirteen-child
Theme URI: http://www.example.com
Description: A Twenty Thirteen child theme
Author: WPBeginner
Author URI: http://www.example.com
Template: twentythirteen
Version: 1.0.0
*/
#import url("../twentythirteen/style.css");
Unfortunately my child theme replaces the parent theme and newly created theme is applying when i activate child theme and there is no parent theme style is applied on webpage.
How can i solve this problem?
Couple things to try:
Double check to make sure your template path in the header you posted actually goes to the twenty-thirteen theme. That could be why the base styles aren't appearing.
Your child theme needs it's own style.css - you can't import that. Read more on the WordPress Child Theme Codex Page.
Make sure you didn't copy over the entire directory into the child folder. That's a common beginner mistake.
Your child theme is supposed to override the parent theme. It supersedes any parent theme files you put into it. For example, if you put a different page.html in the root of your child theme, it would replace the page.html from the twenty-thirteen parent theme.

wordpress child theme styles.css does not want to override parent style.css

My child theme styles.css does not want to override parent style.css.
I am working with the wordpress theme twenty fourteen .
I have created a child theme, and through research have found the following piece of code...
require_once( get_stylesheet_directory() . '/my_included_file.php' );
My question is where exactly does this code go? I read in the functions.php. So do I put it in the first line of the page.
I want my child theme stylesheet to take priority over my parent stylesheet.
Thank you any help would be great..
You should not need that code. Once you activate the child theme, that stylesheet will be included after the parent theme's and will therefore override those in the parent theme’s stylesheet.
Read more about Child Themes at the WordPress Codex.
You can directly import your parent-theme style.css by #import url('../parent-theme-name/style.css'); in your child-theme style.css and below it write your own css code or override the parent-theme css code.
you can also use this plugin to create child theme http://wordpress.org/plugins/orbisius-child-theme-creator/

Child theme not including template files of the parent in WordPress

I am creating a child theme , but my child theme in WordPress not including template files of Parent theme. I have read that all the files which are not included in Child theme are automatically imported Child theme But after activating child theme The website is displaying only header, footer and menus but not any page templates and content. Am I forgetting any step or Do I have to add some code or additional files. I am new to Wordpress.
For creating a child theme, make a folder inside your 'themes' folder with you child theme name. Now the child theme should have a style sheet in it which is a must. So add a style sheet and the beginning of the child theme style sheet should be as follows:
/*
Theme Name: (theme name) Child
Theme URI: (give URL)
Description: (give description)
Version: (give your version)
Author: (author name)
Author URI: (give URL)
Template: (name of parent theme)
*/
Of these the very important thing is the 'Template' which is the parent theme name. To avoid confusion take the name of parent theme from the parent theme style sheet.
Now the second thing is the functions of your child theme. Just add a php file with the name functions.php and place the below code
<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
?>
This code is for enqueuing the parent theme styles.
Here you go! your child theme will work now. It worked for me.

Resources