Questions tagged [child-theme]
Child theming is a safe way to modify a theme. A child theme inherits a "parent themes" styles and then can selectively override. This alternative to "destructive" editing allows for safe updating of the parent theme and provides an easy way to undo theme changes.
1,250 questions
1
vote
1
answer
57
views
Unable to remove action from parent theme via child theme
The Blank Slate theme (in its functions.php) adds a jQuery script to each page, which I would like to remove:
<?php
/* ... */
add_action( 'wp_footer', 'blankslate_footer' );
function ...
1
vote
0
answers
23
views
Disable astra_get_search_form from generating in header [closed]
I have a website with an Astra child theme.
Astra is generating a search form in my header.
The form is generated 4x by Astra, and as the method="get".
I don't use this form, and there is ...
0
votes
1
answer
40
views
How to overwrite a thrid party block's css in a child theme?
Consider a Wordpress (6.6) child theme based on the default Twenty Twenty Four theme: How do you style form fields used in third party blocks?
Just copy and pasting a modified version of the third ...
0
votes
0
answers
21
views
How can i change the class of a post from a theme?
According to this link…
https://developer.wordpress.org/reference/functions/post_class/#Add_Classes_By_Filters
…i can add a filter to change the class(es) of a post. How can I do this from a theme? I ...
2
votes
0
answers
79
views
How to Use Webpack with WordPress Script Modules and Enqueue a Custom Class
I am working on a WordPress project using version 6.5, which introduced support for JavaScript modules. I have a parent theme that exports a JavaScript class, and I want to import this class in a ...
0
votes
1
answer
35
views
Migrating a Bootstrap 3 Website to WordPress
I'm in the process of migrating a legacy Bootstrap 3 website with around 300 pages to WordPress. I'm planning to use GeneratePress as the theme and WPBakery Page Builder along with some additional ...
0
votes
2
answers
48
views
For a Child Theme, do I duplicate the parent style.css and then add my child css?
I'm creating and installing a child theme for the first time. There are only a few edits to the style.css and one to the functions.php file. Do I need to copy the entire parent style.css into the ...
0
votes
0
answers
40
views
Twenty Twenty One update changes dom classes and breaks my child theme
I built my first child theme and am paying the price of my ignorance.
It basically breaks all the time. Every update to the main theme (Twenty Twenty One) seems to change some class name that my js ...
1
vote
1
answer
97
views
Can't make an external api call in php side of wordpress child theme
Edited 07-14-24 to show permission callback in api
Edit 2: showed my fatal error
I'm new to making api calls in wordpress. I need to make an api call through the backend to a 3rd party api. I can't do ...
0
votes
0
answers
16
views
Live Preview while customizing is not showing the updates while editing in WordPress
I'm working on a small website in WordPress, when clicking the "customize" button, it will open a page that shows a "Live Preview" of the website and allows you to add custom CSS ...
1
vote
1
answer
47
views
Can't disable child theme style
I got problems with my twentytwenty child theme and hope, that someone can help me.
In order to optimize my website for speed, I'd like to use critical css as inline code. To do that, I wanted to call ...
1
vote
0
answers
29
views
Trying to insert widget code into theme function
The site I am working on has a function in the theme (Botiga) that creates a wrapper row that displays a sorting dropdown for the items below. The default output is the dropdown displays in the right ...
0
votes
1
answer
199
views
Proper way to load styles using a child theme
I decided to start using Elementor Hello theme for building my websites. In the past, I always edited style, templates and other theme files directly from the original theme directory, but I decided ...
0
votes
0
answers
27
views
How to move custom icons from parent theme to the child theme
I have two sets of custom font icons that from my understanding are being loaded by two php files of the theme that i am making a child theme of : admin-style.php & icons.php
admin-style.php :
<...
0
votes
0
answers
30
views
Child theme's functions.php not being read (child theme's autoload.php not being run)
Our child theme's functions.php contains:
require_once __DIR__ . '/vendor/autoload.php';
However, the files that autoload.php loads are not being loaded, and a fatal error occurs. '/vendor/autoload....
1
vote
1
answer
48
views
enqueue_custom_scripts isn't working
I am attempting to use javascript to activate hotpots I have made in Wordpress, (using HTML and CSS but when trying to enqueue my custom script. Nothing is happening.
function ...
0
votes
3
answers
257
views
Wordpress child theme widget customization - Eduma
0
I'm in a bit of a struggle at the moment so I could use some help.
The thing is, I need to fix some fields for registration in the Eduma theme Eduma theme has it's own child theme called Eduma-child,...
0
votes
0
answers
89
views
ACF Pro simple Business Directory - Requesting assistance with created Templates and associated Functions.php Coding
I want to replicate the basic Business Directory functionality found at this URL. We've not had any luck with off-the-shelf software and our needs are very basic.
https://onetopanga.com/directory
This ...
0
votes
1
answer
780
views
How do I create a single.php file as the default template for single posts in the twentytwentythree theme?
I am trying to create a single.php file to be the default template for displaying single posts in a child theme that I have created from the TwentyTwentyThree theme. The reason I want to set this as ...
0
votes
2
answers
461
views
How to disable the autozoom on mouseover for the product image in Storefront theme of WooCommerce?
I'm currently using the WooCommerce plugin with the Storefront theme on my WordPress site. On the single product pages, the main product image has a default mouseover behavior that I want to modify.
...
0
votes
1
answer
41
views
Category theme template becomes default template for child theme
I am developing a child theme and have created a custom template for "category/ archives" page for a specific category
However, For some reason this custom template has become the default ...
0
votes
1
answer
113
views
twentytwenty children theme, using gutenberg, changing a title change them all
I started to look forward modifying thèmes and i made a children theme from twentytwenty. On the landing page, using gutenberg, i edited page name at top, then added some paragraph, gallery and when ...
0
votes
1
answer
28
views
Child Theme Reverts to Parent Theme After Activation: Customizations Lost
I'm experiencing an issue with my WordPress child theme. I created a child theme based on the 'drinkify-lite' parent theme and used the provided code to enqueue the parent styles in my child theme's ...
0
votes
1
answer
111
views
How do I know if the custom theme is a child theme or a full-custom theme?
Inherited a custom built WordPress site. How do I know if the theme it uses is a child theme or a full-custom theme? I would like to delete the unused themes for security and to free up space, but ...
0
votes
1
answer
68
views
How can I add ReactJS to the child theme?
So I wrote ReactJS, CSS and HTML code of a calendar, separately from WordPress development, and want to add this calendar to a specific page on my website.
So far I have this code:
function ...
1
vote
1
answer
296
views
Unload templates; disable parent Template Parts using only "theme.json"
I'm currently creating a child theme in WordPress and I'm having trouble with template parts and custom templates from parent theme. In particular, I want to disable some of the template parts ...
0
votes
2
answers
1k
views
Custom WP Blocks (register_block_type) in a Parent Theme
I have a parent theme that was developed as a project base, and within that I have been building up a group of completely custom WP Blocks (scaffolded with npx @wordpress/create-block).
These blocks ...
0
votes
1
answer
63
views
Modifying posts based on category in TwentyTwentyTwo theme
This is quite a starter question.
I want to change the style of all the posts in the "photos" category by adding custom CSS to the style.css file of my child theme. However, I cannot find any ...
0
votes
0
answers
45
views
Any plugin installation and update overwrite current theme
I'm facing a strange situation. I have a website with custom theme and custom child theme active and every time I try to update or install a plugin via admin interface, the plugin extracted files ...
0
votes
0
answers
28
views
Is it possible to load a child theme from a remote server?
Was wondering if we could store and serve a child theme (style & functions pages) on a remote server or website instead of a folder within the main theme & hosting? Or do you always have to ...
0
votes
0
answers
74
views
Custom Theme Additonal CSS "<" and ">" are transformed to ">" and "<"
Im using Elementor Child Theme and in there im sometimes writing "Additional CSS" and till yesterday everyting was working correct. But since today "<" and ">" are ...
1
vote
1
answer
585
views
How can I use AJAX in child theme template?
I'm trying to perform an action with AJAX in a Child theme template in Wordpress. I've looked into many similar issues. However, I couldn't find a solution. I've been dealing with this for about 2 ...
1
vote
1
answer
201
views
Child theme css not loading when declared in parent functions
This code exists in the parent theme functions to load the child theme styles if the file exists but it is not loading at all even though the theme.css file is present in the child theme assets ...
0
votes
1
answer
25
views
post_row_actions filter from parent theme not executing in child theme
In functions.php for a theme I include a file that adds functionality to allow the easy duplication of posts - the include file contains the code from this (very useful) webpage. I include it like ...
1
vote
1
answer
569
views
theme.json should be in the child theme folder when using xxxx.json style located in the styles folder?
I'm making a child theme of TT3.
I'm using a json style in my child theme located in a styles named folder.
Do I have to have a copy of TT3 theme.json in my child theme ?
2
votes
1
answer
530
views
Twenty-Twenty-Two Child Theme Mega Menu
I’ve got a limited knowledge of CSS. What I know I've learned while programming. That said, I’m working with the Twenty-Twenty-Two theme. I’m trying to add a mega-menu to my child theme. The ...
0
votes
1
answer
51
views
How to fix enqueue_styles error for a twenty-seventeen childtheme
I have searched your site but cannot find and fix this error I get:
Notice: Function wp_enqueue_style was called <strong>incorrectly</strong>. Scripts and styles should not be registered ...
2
votes
2
answers
2k
views
How to set the background color of a template part (Header/Footer) in Twenty Twentythree?
In Wordpress's shiny new Twenty Twentythree theme, how can you assign a background color to the header or foother template parts?
Can this be done in a child theme - through theme.json? Or somehow ...
5
votes
1
answer
75
views
How to move the customizations done in the Editor to my child theme?
Dashboard -> Appearance -> Editor -> 3-dots menu -> Export lets one download a zip file, which contains the folders parts and templates that - according to various online tutorials - ...
1
vote
2
answers
237
views
Remove Google Fonts from parent theme within a child theme [closed]
I'm using a third-party theme with a custom child theme on a website and want to remove the Google Fonts from the parent theme within the child theme's functions.php. This is not working - nothing ...
0
votes
1
answer
69
views
Custom Post-Rename Function Does Not Function in WordPress 6.x
I have the following function in functions.php in a child theme:
<?php
add_filter( 'wp_insert_post_data' , 'modify_post_title' , '99', 1 ); // Grabs the inserted post data so you can modify it.
...
0
votes
2
answers
807
views
How can I show template dropdown in custom post type?
I have created a new custom post type in wordpress using register_post_type() function But when I click on add new in right side the editor not showing template choose option as you can see in ...
0
votes
0
answers
43
views
ways to create customized theme (hard coded - no pagebuilder)
I'm a front-end developer, I have question hope u guys can help me, what do you think is the best practice to create a customized theme? I have this project and I'm contemplating which method to use. ...
0
votes
0
answers
24
views
Check if style is declared in child theme from within parent theme. if so, use that style in parent theme
Wondering if there is a way to check if a scss style is declared in a child theme. If it is then i would like to use that style inside its parent theme. Does something like this exist?
0
votes
2
answers
76
views
How to handle a large child theme
I downloaded a theme which was set up with lots of "unnecessary" functions, but the core funtionality is good, rare, and very hard for me to re-create, so I want to stick with it. However, I ...
0
votes
0
answers
32
views
Inline CSS header style priority function.php Child (no enqueing I think)
I am webdesigner that knows some basic CSS and HTML. I never worked with PHP and I don't know how to handle this problem but I think it's fairly easy... Well I hope.
This is the code:
<?php
if ( ! ...
0
votes
0
answers
35
views
How to replace function in child theme?
There is a function in the parent theme:
function latest_comments($list_number = 5, $cut_length = 50)
{
global $wpdb, $output;
$comments = $wpdb->get_results($wpdb->prepare("SELECT ...
0
votes
1
answer
785
views
How to override theme class function to child theme? [closed]
File: wp-content\themes\theme-t\includes\classes\ClassX.php
class ClassX extends Base {
public function some_logic() {}
}
I want to change the logic of some_logic() via child theme, how it is ...
0
votes
1
answer
237
views
Show excerpt and not full post in Twenty Seventeen
Help a non-coder out! I tried using child theme configurator, and have successful created a theme child, but it doesn't appear to contain the same code as the parent theme. And all the answers to a ...
0
votes
1
answer
125
views
Child Theme style.css changes aren't showing. Parent "style-less.css" over rides it, and won't update
I'm using a child theme with a style.css file and none of the updates are showing on the live site.
When I view the child theme style.css file via "view page source" the changes show in the ...