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.

Filter by
Sorted by
Tagged with
0 votes
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 ...
0 votes
1 answer
24 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
814 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: ....
4 votes
1 answer
713 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 ...
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
956 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
3 answers
2k views

Override Dokan Includes File in Child Theme

I'm trying to override this Dokan plugin file in a child theme: wp-content/plugins/dokan-pro/includes/modules/vendor-verification/templates/verification-new.php I can successfully override files in ...
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
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
3 answers
831 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
0 answers
18 views

Confusion about theme's parent and child functions.php file

So I read WordPress documentation here: https://developer.wordpress.org/themes/basics/theme-functions/ Where there's such statement: Although the child theme’s functions.php is loaded by WordPress ...
2 votes
1 answer
1k 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
19 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
703 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-...
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
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 ...
0 votes
1 answer
28 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
2 answers
936 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?
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
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
1 answer
935 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 ...
7 votes
2 answers
8k 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 ...
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 ...
0 votes
1 answer
723 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
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
2 answers
105 views

How to Change Site Elements based on referring URL

I want to create WordPress website that changes branding and theme based on the referring URL. We provide white label services to funeral homes and we want to create a generic site where funeral ...
0 votes
1 answer
666 views

Menu on responsive twentytwelve theme not working, strange url error

i use twenty twelve custom theme (palumariosrl.it) but i have a problem. If i try to use on responsive mode the menu not function (can i see only hover menu page and if i click on menu buttom i have a ...
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
694 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
29 views

Site with child theme breaks parent theme even after activating just parent theme

I have a site that was using the chromeblog child theme of chromenews. I wanted to change just a few .css values to adjust a couple colors and the sidebar width. Since I was under the impression I ...
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 ...
2 votes
1 answer
648 views

Recommended way to load / enqueue parent and child stylesheet to enable cache busting

After reading several posts here (including [1] and [2]) and testing with Wordpress 4.5.3 using Twenty Sixteen as parent theme, I think the following (in functions.php) code must be correct: function ...
0 votes
1 answer
2k 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
2 answers
713 views

how to fix loading scripts in child theme?

I am trying to integrate an animation in my Wordpress home page, for this I am trying to load scripts from "skrollr" library, but my styles and scripts don't load. this is the code I added is ...
0 votes
0 answers
27 views

Intelephense not recognising parent theme functions

So i have the intelephense ext on VS code, and i have managed to have it recognise ACF functions by downloading the stubs to my computer. however, it does not recognise parent theme functions, ...
0 votes
1 answer
29 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 ...
0 votes
2 answers
336 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
0 answers
13 views

Wordpress menus: Change URLs

I am new to Wordpress. I use it with Avada and Avada Child Themes. I have not set up the site, I only administrate it. In the following I will name all pages (sites, products, calender, ...) as "...
0 votes
0 answers
15 views

Updating plugins overwrite theme

I'm facing the same issue on the second website. Everytime I update a plugin, this disappears from the plugins directory and its files completely overwrite those in the active child theme directory. ...
1 vote
2 answers
5k views

How do I override a sidebar that is registered in a parent theme when using a child theme?

I currently am using a child theme, and its parent theme has registered sidebars already.. My. problem is that i want to change the parent theme's dynamic sidebar From: register_sidebar(array( ...
0 votes
1 answer
66 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
1 answer
2k views

Child Theme not overwriting Parent theme php file

I'm new to Wordpress and how Child themes work. My child theme I am trying to overwrite two files in sub-directories. I've copied the parent files and edited them in child theme but changes are not ...
12 votes
4 answers
25k views

Childs PHP files not overwriting Parent's PHP files

I have a php file located at: .../wp-content/themes/kallyas-child/pagebuilder/elements/TH_TeamBox/TH_TeamBox.php I'm trying to use the above file to overwrite the parent's TH_TeamBox.php file which ...
0 votes
1 answer
37 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
32 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
23 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
43 views

Custom Theme Additonal CSS "<" and ">" are transformed to "&gt" and "&lt"

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 ...
19 votes
6 answers
21k views

How to *remove* a parent theme page template from a child theme?

I'm using the TwentyTen theme to create a child theme, but I can't seem to get rid of the 'One column, no sidebar' page template that is in the TwentyTen parent theme. I thought just copying it over ...
0 votes
1 answer
247 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
120 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 ...

1
2 3 4 5
25