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
47 views

Running script based on Category

I have a child theme with function.php where I am running a script in the header but now I want to tweak it to run only on posts listed under one category and avoid on homepage or other categories. ...
howtocode's user avatar
0 votes
1 answer
136 views

Page header on specific page is different from the rest [closed]

I've been trying to solve this for ages now. I finally resorted to asking. I am using a theme and I have created a child theme. Everything is working fine, except the that one page uses a completely ...
joey's user avatar
  • 1
0 votes
1 answer
102 views

How to sync the style in the visual editor with the style of a child theme?

I have a wordpress site with twenty-twenty theme sightly modified with a child theme. The site's publically accessible surface is displayed correctly according to the modifications declared in the ...
user avatar
1 vote
1 answer
1k views

wp_add_inline_script not adding when script_loader_tag filtered

I'm trying to add the new GA4 code to an existing site, and there seems to be some conflict / ordering issue between script_loader_tag filters and wp_add_inline_script. My functions.php looks thusly: ....
philolegein's user avatar
0 votes
0 answers
218 views

call_user_func_array() expects parameter 1 to be a valid callback, class 'WC_Rapyd' does not have a method 'install'

We've installed the Woocommerce Rapyd Payments plugin and have the issue that the payment option is not loading on the front end. Query Monitor is showing the above warning message, but I haven't been ...
Gooba's user avatar
  • 1
5 votes
2 answers
3k views

Get parent theme version

How do I get the parent theme's version in a child theme? I want to use it when loading the parent theme's stylesheet. Here's how I load the stylesheets in the child theme's functions.php file: ...
transbetacism's user avatar
0 votes
2 answers
5k views

filemtime(): stat failed warning within a child theme

I am trying to work on my child theme, but I can't get rid of the filemtime(): stat failed warning, which appeared as soon as I activated my child theme. After reading other questions, I understand ...
Kris K's user avatar
  • 3
0 votes
0 answers
115 views

Want to know how to reveal a WordPress theme, considering the theme name is hidden?

Please can anyone advise, I want to know what If a WordPress theme is hidden from the directory folder? And a result no online extension will able to track the original theme name used to create the ...
Zamil Ahamed's user avatar
1 vote
1 answer
562 views

Adding tawk.to code just before body tag on functions.php file

I would like to add tawk.to widget script just before the body tag. I would like to add the code to the functions.php file of my child theme. How can I do this? A code sample will assist a long way. ...
3vanse's user avatar
  • 13
0 votes
1 answer
244 views

Adding a schema code to one specific page using functions.php file

I would like to add a schema code I have generated to one specific page on my website using functions.php file on my child theme. How do I do this?
3vanse's user avatar
  • 13
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/...
Chrizzly's user avatar
0 votes
1 answer
155 views

Remember language choice on multisite website

I have a multisite website with 3 websites representing 3 languages. On my network website https://example.com I have a page with 3 language choices linking to https://example.com/nl?language=nl, ...
netcult's user avatar
0 votes
1 answer
49 views

Dequeing Parent Fontawesome Deques Parent Styles

I'm trying to dequeue fontawesome from a parent theme in my child theme. For this I use the following code: function si_dequeue_child_styles() { wp_dequeue_style('wp-bootstrap-starter-fontawesome-...
TheKidsWantDjent's user avatar
0 votes
1 answer
102 views

issue on creating child theme

I want to create a child theme. But my parent theme is different from the child theme. Parent theme and child theme have 2 different styles. The parent theme is the LeadEngine theme and the child ...
Sabbir33's user avatar
  • 103
0 votes
1 answer
49 views

why post_class() function apply css classes to all other files?

I use the post_class() function to add a custom class of CSS like width and display property. But it applied to all other files like the about page, contact page. I tried to use the WordPress class ...
vishal's user avatar
  • 23
0 votes
1 answer
17 views

Updating an imported child theme from the wp-admin UI

I have full access to the wp-admin area of a remote WordPress site. I would prefer to work in this UI the whole time and not use FTP. I have successfully imported my custom child theme for an ...
klewis's user avatar
  • 845
3 votes
0 answers
1k views

Changing order title and featured image in blog post (Astra theme)

The HTML of a post type, I want to swap the position of the title and the thumbnail. I noticed that the title and thumbnail are inside a <header> tag. So I went looking which template file has ...
Immers's user avatar
  • 131
0 votes
1 answer
146 views

In child theme, add CPT to custom taxonomy registered in parent theme

I'm using Divi with a child theme. Divi (parent theme) has a CPT called project and two custom taxonomies, project_category and project_tag. In my child theme I created a CPT called external_project. ...
Ryan Patterson's user avatar
0 votes
0 answers
113 views

Child theme not activating despite success message

I'm struggling to activate a child theme on my WordPress. I tried with this combination: style.css /* Theme Name: test child Template: parent-theme-directory-name Version: 1.0.1 */ functions.php <?...
user3058763's user avatar
0 votes
1 answer
54 views

Theme that includes a "core" plugin but the files in theme and child folder ignored

I have purchased to themes from Qode which my client has chosen. Both themes have a "core" plugin which is used for specific areas, like "events", breadcrumbs and portfolios" ...
Deb Shaw's user avatar
0 votes
0 answers
61 views

Why front-page.php doesn't show content of file instead shows loop

Firstly, I understand the template hierarchy a little bit and read all the answers given by experts but unfortunately didn't get that. Here is the problem I face: If I use home.php then the content ...
Raashid Din's user avatar
0 votes
1 answer
173 views

Remove Stylesheet by URL that has not been enqueued

I am editing the theme Peggi (https://themeforest.net/item/peggi-a-multipurpose-wordpress-children-theme/22094659) over a child theme to make it GDPR compliant. I managed to remove all external ...
toneyt's user avatar
  • 41
3 votes
1 answer
4k views

How to solve "Warning: Use of undefined constant" when overriding a parent theme function in the child theme?

I am overriding a function in a parent theme by placing the below code in my child theme's functions.php file. The function works, but it is throwing this error: Warning: Use of undefined constant ...
Cat's user avatar
  • 165
1 vote
1 answer
35 views

Don't know how to show custom taxonomies from a custom post_type

I created a custom post_type called Events, where I can show the Events(URL:HTTP://localhost.com/events) that are load by the archive-events.php that I created. Now I have created a custom taxonomy ...
Tincho N's user avatar
0 votes
2 answers
251 views

WP 5.5, child themes, customizer and a weird cache issue

Update: I created a fresh new installation of WordPress, copied both Base and Base Child themes and activated Base Child. The Appearance/Customize gives the same white screen as described in point 1 ...
George's user avatar
  • 3
0 votes
2 answers
430 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) { ...
shotput_wp's user avatar
0 votes
1 answer
615 views

Fatal error and use of undefined constant in child theme unless I redefine it

Child theme functions.php: // Init. require_once( WPBF_CHILD_THEME_DIR . '/inc/init-child.php'); In the parent theme functions.php, the constant is defined: define( 'WPBF_CHILD_THEME_DIR', ...
zigojacko's user avatar
  • 242
0 votes
0 answers
78 views

How to change this ajax function to submit to the default wordpress content area instead of the custom field 'seller notes'?

I am stuck editing this form submission. When a user fills out the form, I want to map the 'stm_seller_notes' to the default wordpress content area. There are two problems I am trying to solve, stop ...
Aran Joyce's user avatar
0 votes
1 answer
71 views

Can't locate custom image sizes defined by child theme

I'm developing a child theme (mms-child) based on a simple parent (mms – also my dev). I am quite used to the usual way of defining custom image sizes within functions.php as follows: ...
mtm's user avatar
  • 41
0 votes
2 answers
274 views

Removing parent theme action on pluggable function not working

I'm trying to remove a parent theme's add_action call to a pluggable function, but can't get it to work by calling remove_action() - I have to redeclare the function and just leave it empty. Is this ...
Michelle's user avatar
  • 3,438
0 votes
1 answer
123 views

Adding an option to post editor to show a site disclaimer or message

I was wondering how I would go about adding an option to add a site disclaimer or message for a published post in Word Press. Something like this (Please See Below) Which by checking the box will ...
Nik's user avatar
  • 1
0 votes
0 answers
197 views

admin-ajax error 400

I've gotten the following code to work when I put it in functions.php of a theme, but because it was causing other pages to have errors, I've created a child theme and am attempting to put the code in ...
Daniel Nebert's user avatar
0 votes
2 answers
1k views

How to specify the path for require_once in a child theme?

I have a child theme folder called themes/child-theme and inside I have a file dashboard_payments.php. Under the child theme folder I'm creating a new folder called gateway and inside there's a config....
cilapo1541's user avatar
0 votes
1 answer
54 views

How would I go about replacing this function in my child theme located in inc/template-tags.php

How would I replace this function that lies inside inc/template-tags.php in my parent theme function theme_navigation() { ?> <div id="theme-nav-container"> ...
Anders Kitson's user avatar
0 votes
0 answers
147 views

Child theme overirde template-tags in a theme built on underscores in inc/template-tags

I've read this post and I don't think this question is a duplicate because I have a specific question that has not been answered. My parent theme is using the following to require a template tag php ...
Anders Kitson's user avatar
0 votes
1 answer
61 views

Randomizing wp_tag_cloud() in child theme

I'm trying to write a wordpress function code in my child theme that randomizes the words in the word cloud where previously it was alphabetized. The code Im using is below, which doesn't work. // ...
T. Thomas's user avatar
0 votes
1 answer
39 views

Trying to customise 2011 Child Theme Background Colour

I am trying to customise the background colour of my site. It's a 2011 Child Theme. When I go to Appearance -> Customize -> Colors, I get the Light and Dark option under Color Scheme, but can't ...
Anthony Moore's user avatar
0 votes
0 answers
40 views

Child theme stylesheet not reflecting the changes

I have created a child theme and the website is showing up properly with the activated child theme. I made some changes in the child theme's php files for adding two controls in the child theme's ...
Pushku's user avatar
  • 1
0 votes
1 answer
461 views

Is it possible to override only a part of another plugin's / theme's js (asset) file?

I try to go one step forward based on this question and instead of overriding the whole .js file of another plugin, i'm wondering is it possible to override/swap only a part of that js file ...
Viktor Borítás's user avatar
0 votes
1 answer
768 views

Warning: printf(): Too few arguments in helpers.php file

So I'm getting the following error Warning: printf(): Too few arguments in /lib/helpers.php on line 34 So line 34 is 'class' => [] // Define the read more url function read_more_url() { // ...
DevSem's user avatar
  • 209
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 ...
Alton Caber's user avatar
0 votes
0 answers
43 views

Remove action not working in child theme

I am trying to remove action but it is not working: How can I remove this add_action('wp_footer', array($this, 'enqueueScriptsAsync'), PHP_INT_MAX); specific action in child theme? class TidioLiveChat ...
user avatar
0 votes
1 answer
197 views

WordPress childtheme not loading any CSS/SCSS

I'm using the BigFoot theme and I've made a child theme from this. I've set everything up, my child theme is activated in the wp-admin and everything looks good but for some reason my page isn't ...
Maxim's user avatar
  • 1
0 votes
1 answer
3k views

Remove CSS Attribute by Overriding CSS in Child Theme

I have a theme I am trying to customize the style, and to do so, I have created a child theme. The child theme contains a style.css and I've been able to override certain attributes, but I can't ...
Blaine's user avatar
  • 127
1 vote
0 answers
29 views

How to change only one javascript function in wordpress child theme?

I would like to change just one JavaScript function in the child theme but without having to insert all the JavaScript code of the parent theme. How do I change only this function (I need change only ...
Fg_'s user avatar
  • 11
1 vote
0 answers
22 views

How to integrate my HTML and javascript into my child theme

I have a javascript script, html, and css I put together on JSfiddle that I now need to essentially put on a page in wordpress. I'm using a child of the generatePress theme. I'm doing it this way ...
Alexis Richard's user avatar
0 votes
1 answer
355 views

How to enqueue multiple style sheets into my child theme in wordpress (oceanwp)

I would like to import several styles sheets in my child theme (oceanWP). I succeed to do it with "@import" method but not with enqueueing scripts and styles. My child theme uses this "style.css" : ...
Phil's user avatar
  • 3
0 votes
1 answer
24 views

All Titles and Menus changed to "CHILD THEME LOADED"

I'm testing out a theme update on our website using a staged site created by WPStaging. That part seemed to work well. Then I upgraded the theme, created a child theme from it, and applied that ...
Fred Hamilton's user avatar
-1 votes
1 answer
51 views

WordPress | enqueue_scripts in a child's theme returns error

I intended to load a script within a child's theme because I wanted to experiment with a feature. Initially, I loaded the script as follows: // loading menu toggle function function ...
joubibdev's user avatar
-1 votes
1 answer
21 views

add_action works outside condition but not inside it

I am developing a theme framework for my own purposes. So this time i am facing a problem, that is add_action works out side conditional. add_action( 'meanz_before_main_wrap', '...
Raashid Din's user avatar

1 2
3
4 5
25