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,251 questions
0
votes
0
answers
9
views
Post Navigation Elementor
I'm using Elementor and ACF on a website and have a custom post type for events. In elementor I have the posts on the archive page set to order by the ACF start date field. When the user clicks the ...
0
votes
1
answer
714
views
How to add meta fields to custom taxonomy add/edit page?
I have a custom taxonomy 'issue'. I tried to add some meta fields to the add/edit issue pages in the dashboard using the method explained by Ohad Raz (https://en.bainternet.info/wordpress-taxonomies-...
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 ...
0
votes
1
answer
3k
views
remove_action() hook not working
On my child theme,
I created this:
remove_action('woocommerce_single_product_summary','woocommerce_template_single_excerpt',20);
add_action('woocommerce_single_product_summary', '...
0
votes
1
answer
1k
views
child index.php does not overwrite parent index.php in twenty fourteen theme
I am using the twenty fourteen theme to create a child theme and want to make changes to the index.php, but when I copy the index.php file to the child theme's directory and edit it, it doesn't change ...
0
votes
1
answer
1k
views
How to enqueue stylesheets in child-theme functions.php?
I know this topic is old hat, but I still got issues with that.
I use the elementor child-theme and try to enqueue the following stylesheets
hello-child-theme-folder: style.css
hello-child-theme/...
0
votes
1
answer
1k
views
Pseudo class :before don't working in a specific button
Currently, i'm building an ecommerce and a small button was running with pseudo class :before suddenly stopped working.The site run WP with Divi and Woocomerce. I wish the bellow code back to run:
....
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
1k
views
Loading my main.js file from my child theme
I have built a child theme out from the original parent theme. Having on completion learnt that it is standard industry practice to build a child theme (preferably from the start.)
I have managed to ...
4
votes
1
answer
826
views
How to use parent theme's enqueue methods
According to the codex, when creating a child theme, you have to manually enqueue the parent theme's scripts.
My parent theme has logic to conditionally display various css files, cached css, and ...
1
vote
2
answers
1k
views
Add custom function to a theme with child theme's functions.php
I am using a theme Indigo and have it working fine, in a child theme configuration. I want to add a custom function. Unlike the child style.css, I have read that you don't need to import the parent ...
0
votes
3
answers
837
views
Why won't my Custom CSS Load
I'm in the process of adding a jQuery plugin to a site I'm working on. Needless to say it requires loading a custom script; also a custom stylesheet.
Starting with the stylesheet I've been ...
0
votes
1
answer
2k
views
How to override html codes in wordpress?
<article id="post-<?php the_ID(); ?>" <?php post_class( array('list-article', 'clearfix') ); ?>>
<div class="list-article-thumb">
<a href="<?php echo esc_url( ...
0
votes
2
answers
786
views
Add Javascript code to functions.php childtheme
I would like to add the following JavaScript function to a wordpress child theme (functions.php). Unfortunately I am not able to make it.
Function:
$.fn.cityAutocomplete.transliterate = function (s) {
...
0
votes
2
answers
470
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
2
answers
2k
views
Modifying child theme's header
I'm a noob.
I have copied the header.php from the parent theme, I have added some snippets and things work. However, I would like to be able to add those same snippets either using a plugin or via ...
7
votes
2
answers
9k
views
why is translation not working on theme?
Background
I am using the theme Rookie from Sportpress.
I created a child theme.
Translation files are existing, especially german in my case.
Wordpress is set to german language.
The Problem
...
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 ...
0
votes
2
answers
1k
views
How to display home page last modified date in anywhere of wordpress theme?
i just display my recent published and modified posts in homepage (index.php). how can i display last modified date of my home page?
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
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
2
answers
4k
views
Overwrite template-tags.php in child theme
I would like to overwrite some content which is located in (inc/) template-tags.php file on parent theme.
Content need to be changed is in function footer_content_widget_area in template-tags.php ...
0
votes
2
answers
1k
views
Calling Category name without the link
I have looked to see if there is a simple function that only returns the name of a category on a post. I am looking to output it as a subheading for a list of posts but do not want it as a link and ...
0
votes
1
answer
944
views
Include widget file in functions.php of child theme
I've created a widget for WP 5.9.3, based on an online tutorial, which I'd got working okay, but it relied on having all the code in the child theme's functions.php, which started looking a bit messy.
...
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
1
answer
985
views
Why would adding a template file to a child theme cause an error in template-loader.php?
Per wordpress best practices, I created a child theme for an existing theme I have. Everything works fine until I try to add a template file which follows WP's template hierarchy conventions. For ...
4
votes
2
answers
3k
views
How do I override a parent theme's language files with a child theme?
I have a parent theme and a child theme, I would like to override the spanish .mo and .po files in the parent theme (or add them if they are not present in the parent theme) with the es_ES ones in my ...
1
vote
1
answer
1k
views
Edited Child Theme's "header.php" but it doesn't appear to change the file
So I logged into FTP and navigated to /wp-content/themes/MyChildTheme/ and edited the header.php file. I saved the file and uploaded it and I can confirm the file has changed because if I check via ...
0
votes
1
answer
899
views
Child theme is not rendering parent and own javascripts (but css loaded properly, js not)
I have a child theme and a quite empty function.php. The CSS from the parent is picked up by the child theme, but the whole JS section from the parent theme is not rendered in the DOM at all. (I am ...
1
vote
2
answers
2k
views
Add head and body function for google tag manager in child theme
I've got a child theme activated and I don't see any head and body in my child theme to place the GTM snippet.
How do I do this? I rather not paste in the whole head and body in the child theme to ...
0
votes
2
answers
1k
views
function of parent not working in childtheme
I have a plugin used on a parent theme which uses shortcode. The plugin (shortcode) works on the parent theme but when I switch to child theme it no longer works. I've only added the child theme code ...
0
votes
1
answer
745
views
AJAX numerical pagination problem in TwentyFifteen-child theme
I want to create an AJAX numeric pagination. And found code in a website. And it works perfectly at first click event, but on the second click it doesn't.
If I click in pagination page 4, it works ...
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 ...
1
vote
1
answer
98
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
1
answer
1k
views
Fatal error: Cannot redeclare load_stylesheets() (previously declared in
Updated Question:
I’ve declared a basic child theme. As I create a function to enqueue stylesheets, my website crashes and gives me a Fatal error: Cannot redeclare thando_stylesheets() (previously ...
0
votes
1
answer
36
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
49
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 ...
0
votes
1
answer
275
views
Why does using wp_register_style without wp_enqueue load and print CSS tags in the front-end?
I have this piece of code that registers a CSS in a child theme and when visiting the front-end my_css is actually included. Why is that ? I thought that registering meant registering for later use to ...
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 ...
0
votes
2
answers
3k
views
How to override filter in child theme?
I'm trying to override a parent theme filter in a child theme; I must have the syntax wrong as the override is being completely ignored. Here's what's in my child theme's functions.php:
//* remove ...
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
258
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
2
answers
3k
views
Where did my Theme Editor go?
I have 2 blogs, both are versions 3.x
One of them, "Blog 1" is a multi-user blog. I can't edit the themes under Appearance->Editor , because it doesn't appear.
"Blog 2" is a single instance blog, ...