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

how to create a custom page in child theme or plugin?

i'm kind of new to plugins . for a project we need to create a special form which normal plugin won't help us . we should create a special form page which insert data to db . the main problem is ...
hossein khosromanesh's user avatar
0 votes
1 answer
48 views

Making a child theme for "Airi"

I had chosen the Airi theme for my WordPress website. I planned to make some customizations and decided to use a child theme. I had studied the WordPress documentation page https://developer.wordpress....
Sergey Beloglazov's user avatar
0 votes
1 answer
88 views

Storefront theme : Add Categoy to recent products section

I want to modify the Recent Products section Storefront theme to be able to include juste a specific category. i tried that : add_filter( 'storefront_recent_products_args', '...
Younes.D's user avatar
  • 162
0 votes
0 answers
785 views

AJAX not working when clicking load more button, when two terms are present in tax_query

I have inherited a project using a child theme based on the Avada theme. The previous developer has created a plugin to add custom elements to the Avada fusion builder. One of those elements, the ...
mspacecreative's user avatar
2 votes
0 answers
1k views

Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin

I have a code I always used in my themes or child-themes. I'm doing right now a project with plugin-only as a solution, so I tried to copy paste some stuff from child-theme to plugin file, but I get ...
Paweł Bystrzan's user avatar
0 votes
0 answers
51 views

Javascript File Does Not Work

I created a page independent from the theme and added the php and js files of the pageto the theme folder, the php file works but the js file does not. Why could it be? PHP File: <?php if (!...
abdullahyanik's user avatar
0 votes
1 answer
34 views

Why would the child theme load in the Customize preview, but not on the site itself?

I have my child theme folder, the style.css sheet with the required template comment and some custom css, and I have the functions.php page with the required enqueing code. Everything seems to be in ...
Benjamin Jex's user avatar
0 votes
1 answer
30 views

Can I place "parent theme" inside a child theme folder?

Client has a very strange request where they want to just install Child theme and have the parent theme be inside child theme. So essentially, they don't want to show parent theme in the list of ...
Wali Hassan's user avatar
0 votes
1 answer
84 views

Ajax call returning 0 in page template

I try to add custom form in my child-theme. I have been read all documentation of this issues but still return 0, this my code function.php (child-theme) function my_custom_scripts() { ...
raja arab's user avatar
0 votes
1 answer
231 views

What's the default order used by Wordpress to load CSS files?

I am working with a commercial theme on which I am making some style changes. Specifically, the parent theme shows a menu which I want to modify. The code for that menu is: <div class="mobile-...
PaulJ's user avatar
  • 158
0 votes
0 answers
186 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 ...
John Christopher's user avatar
1 vote
1 answer
40 views

Modify some CSS with functions if (function_exists

I have code function php in my parent theme as path my_parent_theme/include/addon/myfile. I have tried using get stylesheet to load the parent function with no succeed. I just dont know how to handle ...
Reza Putra's user avatar
0 votes
1 answer
158 views

Why does the Woocommerce grouped template prints the unpublished products?

It seems that the grouped.php template also prints products with status on concept. I don't know if this is normal behaviour, but that seems very strange. It only should print the products that are ...
Dennis's user avatar
  • 135
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 ...
Thando Hlophe's user avatar
0 votes
2 answers
2k views

Custom shortcode works in Elementor editor but not on frontend

I'm used to creating custom shortcodes through my child theme and Elementor, never a problem. However this time something is wrong, when I inserted the shortcode widget in Elementor editor my code is ...
Sorius_45's user avatar
0 votes
0 answers
60 views

Products category search not working

I am trying to implement a product category search. Here is my searchform.php Here is the image of what I intent to achieve <form id="searchform" method="get" action="<?...
Gbless Sylva's user avatar
0 votes
1 answer
327 views

Change child theme after updating parent theme

First of all, I apologize for my poor English 🙂 I use a theme for our site that needs a lot of changes. I was told to use Child theme, So that the changes we have made will not be lost in the next ...
Jabbarpour's user avatar
0 votes
1 answer
42 views

How to set a custom post type as home page and set post page to regular post?

I am trying to create a child theme where I have created a custom post type i.e "art". I want to display all CPT posts to the homepage with pagination and the regular post to the post page. ...
Ashis Biswas's user avatar
0 votes
2 answers
356 views

The requested theme does not exist. Stylesheet is missing - error after changing style.css name to my-styles.css in wp child theme?

I renamed style.css to my-style.css, but now I am getting an error in WordPress: "The requested theme does not exist. Stylesheet is missing." I know the reason for that error, but how can ...
user avatar
0 votes
1 answer
85 views

How to display custom fields in hestia theme

I want to display my custom fields on the Posts page just next to the author’s details, date, and any other meta data of post in the listed posts. I already have done this in Magazinenp theme ( ID:, ...
himmy gautam's user avatar
2 votes
1 answer
980 views

Trying to add a custom social icon to a Twenty Twenty-One child theme

I am trying to add an icon to the Twenty Twenty-One social icons, but having trouble registering it. This support article refers to a Themes field guide for WordPress 5.5 which gives instructions on ...
Rickmakeitquick's user avatar
0 votes
0 answers
28 views

Change templates in a child theme

I wanted to edit code in a theme. I have created a child theme. I want to edit a posts-3.php file but the changes are not reflecting. Do I have to create folder paths with the same name as that of the ...
Areeb Pasha's user avatar
1 vote
1 answer
269 views

How can I override file featured-image-first.php of Avada theme [closed]

I use the Avada theme, and I have created a child theme (Customweb) for it. I tried to override the file: wp-content/themes/Avada/includes/lib/inc/templates/featured-image-first.php And I try create ...
David Duong's user avatar
0 votes
0 answers
36 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 ...
Daxi's user avatar
  • 1
0 votes
1 answer
909 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 ...
Downforu's user avatar
  • 103
1 vote
0 answers
20 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 ...
Ray Kremer's user avatar
0 votes
0 answers
92 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( '...
Spencer Halstead's user avatar
0 votes
1 answer
28 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 ...
Claudio's user avatar
  • 101
0 votes
1 answer
98 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 ...
Vincenzo Piromalli's user avatar
0 votes
1 answer
24 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/...
Melebius's user avatar
  • 105
0 votes
2 answers
34 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 ...
Rickmakeitquick's user avatar
0 votes
2 answers
36 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 ...
Rabbi Hussain's user avatar
0 votes
2 answers
58 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 ...
JOKKER's user avatar
  • 135
0 votes
1 answer
542 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( /*...
AndrewL64's user avatar
  • 203
0 votes
1 answer
584 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. ...
evavienna's user avatar
  • 131
1 vote
2 answers
53 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 ...
Diego's user avatar
  • 15
1 vote
2 answers
2k 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: ...
Aran Joyce's user avatar
1 vote
0 answers
31 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 ...
user1953359's user avatar
0 votes
0 answers
113 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') != "" ) { ?> &...
Carlos Bermudez Diaz's user avatar
0 votes
0 answers
22 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 ...
Andreas Soraru's user avatar
0 votes
0 answers
29 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?
Jerry Fleurival's user avatar
0 votes
0 answers
39 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 ...
sitestem's user avatar
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 ...
Jan's user avatar
  • 129
0 votes
1 answer
128 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() { ...
AdrobaT's user avatar
0 votes
1 answer
286 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() . ...
Jerry Fleurival's user avatar
0 votes
1 answer
32 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: ...
Teope's user avatar
  • 1
0 votes
0 answers
43 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 ...
kacper3355's user avatar
0 votes
0 answers
30 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 ...
Simon Andrew's user avatar
0 votes
1 answer
37 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 ...
whakawaehere's user avatar
1 vote
2 answers
204 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 ...
MoSaber's user avatar
  • 11

1
2
3 4 5
25