- This topic has 6 replies, 3 voices, and was last updated 9 years, 7 months ago by Theme Horse Support Team.
-
AuthorPosts
-
March 19, 2015 at 9:40 am #23275arisParticipant
Hi,
I need to insert some custom code to footer.php and the plugin provider told me that is better to create a Child-theme so i don’t loose my changes if i update my main theme (ultimate-pro)
so i created the ultimate-pro-child and putted there an empty style.css , then according to this link
http://codex.wordpress.org/Child_Themes
I created the style.css and functions.php
i putted the
—-
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘../ultimate-pro/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘../ultimate-pro-child/style.css’,
array(‘parent-style’)
);
}
—–into the functions.php and activated the child theme, however for some reasons i do not understand it is showing the theme but the rendering is not RIGHT (is showing ALL pages in the TOP-MENU)
Can you please help me to create a child-theme properly so i don’t destroy my Ultimate-Pro theme?
or, is it possible to tell me where can i put some custom code for the footer.php ?
regards,
Aris
March 19, 2015 at 11:51 am #23276arisParticipantin regard to the above post,
after following the instructions from http://codex.wordpress.org/Child_Themes
YOU SHOULD make the settings of “Widgets” and “Menu” again, in order to show properly in the site.
Everything is OK now :), thanks
March 20, 2015 at 5:06 am #23292Theme Horse Support TeamKeymasterThat’s great aris
Thank you!
March 20, 2015 at 5:08 am #23293Theme Horse Support TeamKeymasterThat’s great aris
Thank you!
April 20, 2015 at 6:39 pm #24191JamesParticipantHello
I have tried to setup a child theme following the link:
http://codex.wordpress.org/Child_ThemesMy style.css has the following in it:
/*
Theme Name: ultimate-pro-child
Theme URI: http://catawaterwm.com/ultimate-pro-child
Description: Ultimate Pro Child Theme
Author: James Buckmaster
Author URI: http://catawaterwm.com
Template: ultimate-pro
Text Domain: ultimate—pro-child
*/My function.php has:
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/ultimate-pro/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/ultimate-pro-child/style.css’,
array(‘parent-style’)
);
}when I go to look at me themes I get this:
Broken Themes
The following themes are installed but incomplete. Themes must have a stylesheet and a template.
Name Description ultimate-pro-child Stylesheet is missing.
I’d like to make some modification on the CSS sheets and need to get this child set up just
not sure what I have done wrong./* write custom css */
April 20, 2015 at 6:41 pm #24192JamesParticipantthat /*write custom css*/
actually is on the bottom of my style.css sheet
April 21, 2015 at 4:42 am #24201Theme Horse Support TeamKeymasterHi James,
If you really want to make changes only in css then you may add your CSS via Custom CSS. Goto dashboard -> appearance-> theme options -> design options -> Custom css and add your custom css.
If you like to make a child theme then you need to add the following css in your functions.php
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
hope this may help you
or you may add in your child theme of style.css/* Theme Name: Ultimate Child Theme Author: Self-Help WordPress User Template: Ultimate Pro child */ @import url("../ultimate-pro/style.css"); .wrapper { width: 95%; background-color: #fff; }
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.