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
0answers
13 views

javascript file not working in a plugin template file

Hello and thank you for taking time out of your day to help me. I am working on a website and I want to make minor changes to how a form is displayed. I am using a child theme, I have copied the ...
0
votes
0answers
12 views

Best practice to deploy Node.js Server-Client Code in Wordpress? [closed]

I came across the following Github repository which works great when I install it on my Mac Node.js environment. Github Link What steps do I need to take to deploy this on a live Wordpress site, as ...
0
votes
1answer
21 views

How to install Bootstrap in a WordPress child theme

I want to add Bootstrap to a WordPress child theme that I edit using Elementor. To do that, I used both CDN and bootstrap local files but neither worked. For the local files, I created a bootstrap ...
0
votes
0answers
11 views

Enabling custom post type in Gutenberg / CoBLocks

Hello and thanks for taking a look at this question: I am working with a chid theme and a custom post type (called Projects) which I created. I'd like to be able to add excerpts and thumbnails from ...
1
vote
0answers
16 views

Help with child theme enqueuing additional css files

A few years back, I made some css and template changes directly in my parent theme, because Wordpress was new to me and that seemed easier than messing around with this child theme stuff. It worked ...
0
votes
0answers
24 views

Enqueued script fails

function my_scripts_method() { wp_enqueue_script( 'custom-script', get_stylesheet_directory_uri() . "/js/custom_script.js array( 'query' ),'',true ); } add_action( '...
0
votes
0answers
21 views

Problem with non-wp folders in theme

I am setting a folder, say watch in wp 2020 theme. Problem is that whenever I try to access it from browser say https://domain.com/watch wordpress is throwing a 404 error. Can't figure it out how to ...
0
votes
1answer
13 views

Easily add custom HTML outside the main container?

My theme has set the max-width of the main container smaller than the screen size, and I'm searching for a way to override that in order to add a fullscreen video background. Is there a relatively ...
0
votes
0answers
15 views

Saving two values in dropdown select as separate meta keys in MySql

After two days of research and testing, I am totally stumped on how to correctly parse two unique values from a select field and save each to my database as separate meta key/value pairs. The dropdown ...
0
votes
1answer
8 views

template_include doesn't work with child theme

I am using this code and it works perfectly but it does not work if I activate the child theme how can I solve? add_filter( 'template_include', 'wpse_template_include' ); function ...
0
votes
1answer
11 views

Switching among theme customizations

I am developing a website that should switch between two looks (depending on the season) using different customizations of one WordPress theme. I mean all the changes are done on the wp-admin/...
0
votes
2answers
26 views

Including code from other themes in child themes

I'm about to build a new site based on a theme close to what I'm looking for. I understand the concepts around child theming & have read the caveats about overriding php or css files like the one ...
0
votes
2answers
14 views

Is there any way to put the Google Tag manager Identification code into the child theme?

I know how to create child theme for wordpress theme but having problem in installing Google Tag Manager into the child theme. Normally there are two files in the child theme directory (one is ...
0
votes
2answers
43 views

How to edit HTML of my website on WordPress? [closed]

There's a few parts of my website where I'd like to edit the HTML code. How to edit the HTML code of my website without the edits getting wiped out after an update? I've heard about child theme's but ...
0
votes
1answer
80 views

How to change footer credit text in Twenty Twenty One theme with a hook?

If I want to change the footer credits, I would usually copy the footer.php to a child theme and edit the following snippet: <div class="powered-by"> <?php printf( /*...
0
votes
1answer
15 views

Add custom css file after plugin css with Wordpress Child Theme functions.php

I am trying to enque a css file thorugh my child themes functions.php after a specific plugin css file with the handle openpos.bill.bootstrap. Unfortunately the current code does not load anything. ...
1
vote
2answers
36 views

Create a customizable child theme

Here's the situation: I've created a child theme that enhances a popular parent theme. The enhancements include CSS, JS, and php. I want to use this child theme on multiple sites, and I want to allow ...
0
votes
1answer
136 views

Divi change project category slug

How to change taxonomy urls in wordpress? Following along with this question and this one But can not get the desired outcome. The default is: example.com/project_category/%category%/ What I want is: ...
0
votes
0answers
16 views

Redux - change options via child theme

I've got a weird issue. I'm working on a theme that uses Redux Framework. Redux is added as a regular plugin, it's options are placed in the theme folder (dir: framework/admin/options/.php). What I ...
1
vote
0answers
21 views

How do I amend the have_posts function to include custom posts?

I'm building a child theme and have set up an additional custom post type ('blogs'). I need regular and custom posts to be returned on the archive page. The have_posts function only returns regular ...
0
votes
0answers
23 views

Proper way to remove html code on child theme

I'd Like to know what is the proper way on removing this little piece of code on a child wordpres theme <?php if( houzez_option('spl_con_tennant') != "" ) { ?> &...
0
votes
0answers
18 views

Child-Theme Category View with modified permalinks (%category% removed)

I created a new WP Website and added a child-theme to it. The child-theme contains header.php, footer.php and I also created a category.php, in which I show different headers for each category. I ...
0
votes
0answers
24 views

jQuery code not working in child theme JavaScript file [duplicate]

Added in my child's theme JavaScript File: $(function(){ $(".copyright").prepend("Yo!"); }); What's wrong?
0
votes
0answers
28 views

Parent/Child themes - both CSS files loaded

I am trying to use child themes for the first time in Wordpress - and I've got it working (at least from a user's perspective - it functions correctly) My concern is that both the parent and child CSS ...
0
votes
1answer
30 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 ...
0
votes
1answer
43 views

remove_action from parent theme using child theme functions.php

I am trying to remove an action from the parent theme header but I am still not getting any success, here is the class <?php class theme_Header_Layout{ public function __construct() { ...
0
votes
1answer
80 views

Getting an error. Need to add favicon in my child theme functions.php. What's wrong?

When I put this code in my functions.php add_action('wp_head', 'my_favicon'); function my_favicon() { echo "<link rel='shortcut icon' href=' " . get_stylesheet_directory_uri() . ...
0
votes
1answer
14 views

Hide custom field value

On wordpress, I want to hide custom field values only with a button called "For registered members" with a specific hyperlink called "/membership". Here's the demo listing link: ...
0
votes
0answers
37 views

File from parent theme imported to child theme doesn't work - any ideas?

I'm using the latest version of Wordpress and I have such path in my theme: theme/includes/core-functions.php. I need to make changes in core-functions.php, so naturally I want to make them in child ...
0
votes
0answers
19 views

I have updated my plugins, though one page of the site has 'hit a critical error'

I am the main user/access of this site. I updated our plugins and themes. Everything was successful, though only ONE page of the entire website has hit a 'critical error'. It appears to have lost ...
0
votes
1answer
26 views

Why doesn't this function work when I know that the IP Address is “true”?

I am trying to append "DEV SRV:" to the page title (i.e. title tag) if the IP Address matches that of the dev server. I have tried this both in the functions.php file of my child theme and ...
1
vote
2answers
39 views

Can't extend some core classes

I am relatively new to wordpress development, I am trying to extend 'Walker_Category_Checklist' class found in /wp-admin/includes/class-walker-category-checklist.php to customize it for ...
0
votes
1answer
24 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. ...
0
votes
1answer
12 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 ...
0
votes
1answer
22 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 ...
0
votes
1answer
111 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: ....
0
votes
0answers
59 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 ...
4
votes
2answers
239 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: ...
0
votes
2answers
238 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 ...
0
votes
0answers
22 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 ...
0
votes
0answers
25 views

Child theme function.php not working for woocommerce templates file

I have created a child theme. The changes made to style.css & functions.php in the child theme work fine, However the change in woocommerce single-product.php not effective. I've copied the ...
0
votes
0answers
12 views

Why my posts showing in different style?

Folks, I have a theme that has two different styles (classic and modern). So I've set the theme to work always with modern style through the theme setting so all pages and posts are working well ...
1
vote
1answer
51 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. ...
0
votes
1answer
37 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?
0
votes
1answer
60 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
1answer
29 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, ...
0
votes
0answers
25 views

do_action hook is not loading the template parts from child-theme

I have the same exact file/folder structure in my child and parent them but there is this template-functions.php that is still being loaded from the parent theme. The hook that is calling the function ...
0
votes
1answer
13 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-...
0
votes
1answer
24 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 ...
0
votes
1answer
39 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 ...

1
2 3 4 5
24