Using Virtue original theme + CSS and a few PHP edits (without using a child theme)
I want to now install new Virtue Theme updates without loosing my CSS and PHP edits.
Do I create a child theme from my current original Virtue Theme and it will keep everything as it currently is or do I have to create a child theme and it will loose my edits and I’ll have to re-enter them into the new child theme?
I tried creating a child theme before and failed – guidance would be appreciated.
Thanks
Oscar
I’m new to coding, website design and all of that. So when I created a website, I uploaded a theme and made changes in the stylesheet, not realizing that was a terrible thing to do. I now understand I need a child theme so I can make changes safely without risking losing all of my hard work.
I read a “how-to” article by WordPress online and followed it step by step, but did not see the results the article said I should see.
This is the code I put into the child theme stylesheet I created in my file manager:
/*
Theme Name: Swell Lite Child
Theme URI: https://wifeinthewildblueyonder.com/swell-lite-child/
Description: Swell-Lite Child Theme
Author: Alexis M. Rose
Author URI: https://wifeinthewildblueyonder.com
Template: swell-lite
Version: 1.0.9
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: light, gray, white, green, silver, one-column, two-columns, right-sidebar, responsive-layout, fluid-layout, custom-background, custom-header, custom-menu, featured-images, featured-image-header, flexible-header, full-width-template, translation-ready, sticky-post, threaded-comments, editor-style, theme-options, photoblogging
Text Domain: swell-lite-child
*/
Then, according to the “how-to” article, I needed to include the following code in a functions.php file to enqueue the parent and child theme style sheets:
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
function theme_enqueue_styles() {
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style )
);
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
However, this code was breaking the site and not working at all. So I modified the code and this is what I currently have in the functions.php file for my child theme:
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/font-awesome.css' );
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style-editor.css' );
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style-mobile.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ) );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
?>
According to the article, I should see the stylesheet completely loaded into the child theme. But it’s not.
After all of that, my questions are: How do I fix this? How can I make my child theme work? What am I doing wrong?
Here is a link to my site, which is currently displaying the child theme:
https://wifeinthewildblueyonder.com/wp/
Thank you so much in advance for your help. I want to fix this before going live with the site.
Cheers,
Alexis
]]>With the new version update, I’m left with just a white screen when I try to load.
Is there anything in the new update that could be causing my child theme to no longer work? Or is it because I’m missing the previous updates?
Thanks for your help!
]]>2. The size and font of blog date are wayyy tooo small. How can I change this size?
3. I downloaded the Preference child but don’t know how to use it. Is there a beginner tutorial somewhere (preferably video)
4. Something is wrong with my back up. I get a backup error every day.
As you can tell I am a novice. Very little html knowledge and no CSS knowledge. Please help me or guide me to some beginner tuts.
Thank you
www.stampwithjega.com
www.carterieplus.com
i have a site www.kissmybling.com i am trying to edit some of the things on the homepage area. so i know i have to get a child theme and edit in that. now how in the heck do i create a child theme. i am very iggnorant to wordpress, i am very new, and i need it explained in an ‘easy’ language. i am using filezilla (if that matters) and hostgator is my host (if that matters)
]]>My issue is I want to make a page for one of her books. I’d like to use the second column for the pic of the book, and a general description below that. Since there is only one widget for the whole site, how would I make the non-home pages any thing else? I do not want her pic and my thoughts on every page. The only constant column is the third column. How do I make the non-home pages have different things in the columns, mainly the second column?
This is the first hurdle to jump… I made the child folder theme, right now with only the .css file in it.
Any assistance to get through this would be greatly appreciated…
]]>