Community Forums › Forums › General Genesis Framework Discussions › Child theme “setup”
Tagged: css
- This topic has 11 replies, 8 voices, and was last updated 2 months ago by maxwelll22.
-
AuthorPosts
-
November 17, 2022 at 3:18 pm #506191swampbrainParticipant
Please excuse my double posting this to 2 forums. I noticed the other, theme specific forum doesnt get much traffic.
So, heres the deal..
I'm making a custom "starter" theme using the "sample theme" as my starting point. This will be my 1st child theme and I have most of my features (full width, cssgrid layout, custom widgets, glightbox etc etc) complete and considering I haven't looked at a line of css in 10 years I'm pretty pleased.Here's my problem. I don't need or want the child theme setup "stuff" that gets included with the theme activation. Is there a fairly simple way to cut that out of my sample theme? If so I'd REALLY appreciate some guidance/help.
Thanks much!
P.S. I'll be happy to share my child theme freely for others to hack or use as is when I get it a little further along. I'd love some "experts" to look over my functions, css, scripts etc and lmk where it can/could be improved or any mistakes you might spot.
December 20, 2022 at 11:32 am #506393MichaelmatiParticipantYes, there is a fairly simple way to cut out the child theme setup "stuff" that gets included with the theme activation.
First, you will need to open up the sample theme's functions.php file in a text editor and look for any code that is related to setting up the child theme. This code will usually be surrounded by comments that will indicate what it does. Once you have identified the code that is related to the child theme setup, you can delete it.
Once you have deleted this code, you will then need to add some basic information to your child theme's style.css file, such as the name, description, author, and version of the theme. This information will ensure that your child theme is correctly identified by WordPress.
Finally, you can add any custom CSS, templates, and code that your child theme requires. Once you have done this, your child theme should be ready to use just made awesome child theme check here ammostores.com.
Overall, cutting out the child theme setup "stuff" from your sample theme should be fairly simple, but you may want to consult a professional developer if you need more help.
January 1, 2023 at 8:00 am #506480robert70ParticipantYour custom starter theme is looking great! Thanks for sharing! Despite not having worked with CSS in a while, you've incorporated a variety of features and tools in which we work like How to play scrabble. This theme is being used for a new website that we are building. I'll tell my friends about it. Your work is outstanding.
January 16, 2023 at 1:18 pm #506586robert70ParticipantYour custom starter theme is looking great! Thanks for sharing! Despite not having worked with CSS in a while, you've incorporated a variety of features and tools in which we work like Manpower Recruitment Agency for Malaysia and BigShotSlingshotRentals.comManpower Recruitment Agency for Malaysia. This theme is being used for a new website that we are building. I'll tell my friends about it. Your work is outstanding.
January 29, 2023 at 2:19 am #506652robert70ParticipantYour custom starter theme is looking great! Thanks for sharing! Despite not having worked with CSS in a while, you've incorporated a variety of features and tools in which we work like for dramas. This theme is being used for a new website that we are building. I'll tell my friends about it. Your work is outstanding.
February 12, 2023 at 10:16 am #506752robert70ParticipantYour custom starter theme is looking great! Thanks for sharing! Despite not having worked with CSS in a while, you've incorporated a variety of features and APM test tools in which we work. This theme is being used for a new website that we are building. I'll tell my friends about it. Your work is outstanding.
February 14, 2023 at 5:03 am #506765lisacarol864ParticipantWhat I encountered for the current year that worked was having chiefs at creation organizations let me know that they like my material and believe should accomplish something with it. At any rate, in spite of the fact that we really want to continue to compose, david martinez jacket for sale
February 20, 2023 at 7:32 am #506810topcssgalleryParticipantCan I use seperately - genesis theme on site - TopCSSGallery
February 24, 2023 at 10:49 am #506833robert70ParticipantYour custom starter theme is looking great! Thanks for sharing! Despite not having worked with CSS in a while for AI photo editing and AI photo enhancer, you've incorporated a variety of features in Remini mod APK because all in this you get all the pro features of Remini pro for free and for car service from Denver to Breckenridge in which we work. This theme is being used for a new website that we are building. I'll tell my friends about it. Your work is outstanding.
March 31, 2023 at 3:24 am #507101suzzianParticipantThis reply has been marked as private.October 23, 2023 at 4:54 am #507706MaarklariusParticipantYour custom starter theme is looking great! Thanks for sharing!
September 12, 2024 at 8:42 pm #508411maxwelll22BlockedTo address your question about removing or customizing the setup options that come with the parent theme, here's a straightforward approach:
Removing Parent Theme Setup Code
Identify the Setup Code: Look into your parent theme's files, particularly functions.php, and search for functions related to setup options. These might include theme supports, default settings, or any setup functions that are called upon theme activation.Disable Setup Functions in Child Theme:
Add a functions.php file in your child theme directory if you don't have one already.
Remove or disable specific functions by using WordPress hooks. For instance, if the parent theme registers a custom setup function, you can use remove_action to disable it. For example:function my_custom_enqueue_scripts() {
wp_enqueue_style('my-custom-style', get_stylesheet_directory_uri() . '/style.css');
wp_enqueue_script('my-custom-script', get_stylesheet_directory_uri() . '/js/custom.js', array(), null, true);
}
add_action('wp_enqueue_scripts', 'my_custom_enqueue_scripts');Override parent theme options: If the parent theme adds specific options or settings, you can override or disable them by re-registering or customizing them in your child theme's functions.php.
Customizing CSS and JavaScript:Enqueue your own CSS and JS files: To avoid using the parent theme’s setup CSS or JavaScript, make sure to enqueue your own styles and scripts in the child theme. Example:
function my_custom_enqueue_scripts() {
wp_enqueue_style('my-custom-style', get_stylesheet_directory_uri() . '/style.css');
wp_enqueue_script('my-custom-script', get_stylesheet_directory_uri() . '/js/custom.js', array(), null, true);
}
add_action('wp_enqueue_scripts', 'my_custom_enqueue_scripts');Test Your Changes: After making these adjustments, test your theme thoroughly to ensure that removing or disabling setup options hasn’t affected your desired functionality.
Sharing Your Theme
When you’re ready to share your child theme, you can do so by:Providing a downloadable link to your theme files.
Offering documentation or comments within the code to help others understand and use it effectively.
Additional Tips:Consider using a version control system like Git to track changes and collaborate with others.
If you’re looking for expert feedback, you might want to share your theme on development forums or GitHub, where experienced developers can provide more in-depth advice.
Feel free to ask for more details or help if you need it!I did same for my client site.
-
AuthorPosts
- You must be logged in to reply to this topic.