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
1 vote
1 answer
1k views

How can I override a require() used in functions.php of parent theme to my child theme

I have created a child theme for a Theme, Every thing works fine, except there are some files being required in functions.php of parent theme which I want to override it from the child theme. They ...
Javed Akhtar's user avatar
0 votes
1 answer
91 views

Genesis Child Theme - Customize body

So I created a custom post type and I've also created a custom page called page-profile.php that follows the WordPress templating. Here is the code inside page-profile.php: <?php $args = array( ...
user avatar
0 votes
2 answers
975 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?
Jax's user avatar
  • 11
1 vote
1 answer
203 views

Avoid loading css from parent theme

In a parent theme (Foodica Pro) functions.php I have function foodica_scripts(), where css and js are loaded in page header, including: wp_enqueue_style( 'media-queries', get_template_directory_uri() ....
Filip Witkowski's user avatar
1 vote
2 answers
1k views

Child theme style.css versioning

I've been breaking my head on this one. I have a child theme and made changes to the style.css document. These changes did not show up in the reload of the page because there is no mention of version ...
kls's user avatar
  • 21
0 votes
0 answers
262 views

How to work with a custom theme that someone else created before me? (details below)

A company hired me as a web designer. Their website was designed by a private company that created the WP website from scratch: they customized a theme, installed all the plugins needed back then, and ...
user180282's user avatar
0 votes
2 answers
26 views

Downloading customized theme from wordpress

I activated wordpress theme twenty twenty and make some changes in it like background color , change default contents and landing pages etc . Can I export this modified theme and import in another ...
mohammad obaid's user avatar
0 votes
1 answer
219 views

Wordpress core jquery version file not loaded?

I try to put a simple <textarea> with an emoji picker (https://github.com/mervick/emojionearea) in my wordpress site (with buddypress installed, actually I put this in buddypress messages). The ...
ag_1812's user avatar
0 votes
1 answer
29 views

Add back in child theme what the parent theme removed with remove_action

My parent theme removes the emoji fallback script that makes emoji show up as images: // parent theme's functions.php remove_action('wp_head', 'print_emoji_detection_script', 7); remove_action('...
Leeroy's user avatar
  • 111
0 votes
0 answers
17 views

Best practice when a theme already has a parent theme (so can't create child theme)

I've recently purchased a theme which is already has a parent theme as part of the installation (which means I can't create a child theme myself). I understand that it's best practice to create a ...
user1610652's user avatar
0 votes
0 answers
45 views

"Cannot modify header information - headers already sent by" while using get_stylesheet_directory_uri()

I have a very strange problem while trying to include a custom file to my child theme. if I try to use get_stylesheet_directory_uri() along with require it crashes the website. if I try to var_dump(...
user avatar
0 votes
1 answer
165 views

Do I need to create a child theme for JointsWP

I have decided to try o move away from buying bloated premade themes and build my own from scratch. I am planning to use JointsWP along with Elementor Pro page builder. When I install a bough theme, ...
Frederic's user avatar
0 votes
1 answer
306 views

Override plugin images so that they are not removed when the plugin is updated

Is it possible? It's the x in this page. the one for removing the composizioni corali filter. It is in plugins/woocommerce-products-filter/img/ with the name delete.png https://www.digitalmnemes.it/...
MrCrostataH's user avatar
0 votes
1 answer
716 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 ...
Zahid Hossain's user avatar
0 votes
1 answer
67 views

Copy files from main to child theme (after designing website)

Have a new website and want to install Google Tag Manager (GTM). The GTM code requires a (second) tag. According to this site (https://www.wpexplorer.com/google-tag-manager-wordpress/) you can copy ...
nitaro's user avatar
  • 1
1 vote
0 answers
47 views

GET parent theme throws 500 error in console, site works fine

I have a storefront site with a storefront-child theme. Everything works fine except I have an annoying 500 in the console. GET https://fubar.net/wp-content/themes/storefront/?ver=5.3 net::...
Kirk Ross's user avatar
  • 111
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 ...
InstaLoad WP's user avatar
0 votes
1 answer
173 views

CSS Styling a specific page

I am familiar with styling specific pages on WordPress by adding a class .page-id-123 in front of the styled element. However, this doesn't seem to apply to "subpages" (sorry don't know what they ...
jade newport's user avatar
0 votes
1 answer
107 views

Can't switch to a child theme using filters template, option_template and option_stylesheet

In order to dynamically switch a theme in functions file (e.g. when wanting a different theme for a different domain, but same website), you use the following: add_filter('template', '...
Laurence Cope's user avatar
0 votes
0 answers
88 views

Plugin function in child theme

I need to customize a message returned from a plugin function using my child theme. In the plugin: if ( ! class_exists( 'my_class' ) ) { class my_class { if ( ! is_admin() || ( defined( '...
franz877's user avatar
0 votes
0 answers
132 views

How to stop customizer settings inheritance from parent to child theme?

Whenever I change customizer settings, it gets applied to current parent theme AND child theme. If I change customizer settings on child theme, and then switch back to parent theme, the customizer ...
Bruno  Vincent's user avatar
0 votes
1 answer
905 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: ....
Lucas's user avatar
  • 1
0 votes
1 answer
2k views

How to add javascript code into Divi child theme?

I want to add this JavaScript code into my Divi child theme. I have made a directory for the js file inside the Divi child theme folder. The name of the js file is "selectpage.js". <script type="...
davidhlyns's user avatar
0 votes
1 answer
29 views

How do I bring a page template into a new theme with separate styling?

I currently have a page template that I have striped of all major styling within a theme (twentyninteen-child). I have a new child theme (event), that this page/template will sit under and am having ...
jesstp's user avatar
  • 1
0 votes
1 answer
19 views

Crazy redirect happening with no redirects set up

I have a website https://createandgo.com If you hover over 'Design' in the top menu, then click 'How To Write A Blog Post' it adds like 21 URL extensions: https://createandgo.com/blog-writing-tips/-...
Daniel Devereux's user avatar
1 vote
0 answers
48 views

Wordpress Bootstrap Problem

I'm having a problem with my theme's compatibility with bootstrap. So the checkboxes on my website appear double (). So I enqueued the latest Bootstrap CDN (CSS and Scripts) on my child theme and ...
Nextup555's user avatar
1 vote
0 answers
56 views

Add other social networks to TwentyNineteen_SVG_Icons class in child theme?

I'm trying to add items to the $social_icons_map and $social_icons arrays in class-twentynineteen-svg-icons.php I know I need to do it in the functions.php file of my child theme. I think I need to ...
whakawaehere's user avatar
1 vote
0 answers
15 views

How to preserve changes in templates and other files

I've downloaded a theme and then changed some css styles, and also php templates etc. Then I've realized, that when I will have to update the theme I'll probably lose all my changes. Is this kind of ...
xmigas's user avatar
  • 33
0 votes
1 answer
67 views

trying to add extra field using hooks

I am trying to add an extra field on the backend menu of Edit Subscription menu (SUMO Subscription (plugin) -> List of Subscription -> Edit Subscription) I am sending you a screenshot for where ...
Zabzuki's user avatar
0 votes
1 answer
17 views

How can error pages be customized

Googling this comes up only with information about customizing 404 pages of course, I can't seem to find a way to customize this: I'm using a plugin that allows users to submit stuff in the frontend, ...
MAR's user avatar
  • 109
0 votes
1 answer
2k views

Add custom SVG icons to Social Icon MENU in WordPress Twenty Seventeen Child Theme

I'm having trouble adding custom SVG icons to the Social Icon Menu in WordPress Twentyseventeen Child Theme.The menu works fine with all pre-packaged SVGs included with the theme, but I can't add ...
Kelly's user avatar
  • 291
1 vote
1 answer
1k views

How to change the structure/order of sections in a Wordpress theme? [closed]

I am using a Wordpress theme called "business-one-page", here is a link to the demo of the theme: Buisness-One-Page. I am trying to change the structure of the sections. This is a one page theme so ...
davidhlyns's user avatar
0 votes
2 answers
204 views

How does a Genesis child theme understand that the Genesis theme is the parent theme?

In most Genesis child themes, the following line of code exists: // Starts the engine. require_once get_template_directory() . '/lib/init.php'; I understand that this includes the init.php file from ...
mohitb's user avatar
  • 3
1 vote
1 answer
179 views

Mobile issue – website isn't properly detecting screen size [closed]

my question concerns this website (currently on my staging server): https://sunstonebookkeeping.markhannondesign.com The theme is a child theme of a parent theme I created with Underscores and ...
figure2's user avatar
  • 13
0 votes
1 answer
495 views

How to edit button permalink inside function.php using a child theme?

I am using a WordPress theme called "business one page" and it has a slider with Learn-more button. Here is a demo of the theme Business-One-Page I am using a child theme and I want to change the ...
davidhlyns's user avatar
0 votes
1 answer
490 views

Creating a child theme: How do I find the template name of the parent directory?

I am trying to create a child theme for the Fitness Hub theme. I'm following this guide (https://developer.wordpress.org/themes/advanced-topics/child-themes/), when it comes to part 2. it makes it ...
dwright's user avatar
  • 103
0 votes
0 answers
158 views

What is an alternative to not using child theme to customize a WordPress theme?

I'm using a premium parent theme and I've been trying to create a child theme from it and found that some "templates" are not just as simple as overidding them. Read this So, that is the other best ...
worisi24's user avatar
1 vote
1 answer
1k views

Child theme undefined variable error

I'm trying to make my own child theme from Twenty Fifteen. Everything looks and functions fine, but when I turn on debugging, I can see a PHP error: Undefined variable: parent_style on line 13 of ...
Jim Duggan's user avatar
0 votes
0 answers
53 views

Child theme, how to cut the functions.php file into several classes?

The functions.php file of my Child Theme is a mess... I'd like to use classes in a separate folder (like /inc) but I would like to keep a maximum of security. For now everything works as excepted, but ...
cap340's user avatar
  • 123
0 votes
0 answers
36 views

How to locate parent theme functions and add functions to my wordpress child theme?

I am using a wordpress child theme and have added css code to the style.css and everything works well. When i want to add function to my function.php file I always get error message. I am new to using ...
davidhlyns's user avatar
-1 votes
1 answer
937 views

How to let mobile navigation menu close when link is clicked?

I am using a wordpress theme and i wanted to change the navigation menu to a one-page navigation menu. I already made everything work except when i am using a mobile the menu does not close when i ...
davidhlyns's user avatar
0 votes
1 answer
275 views

how to add functions to my function.php using a child theme?

I am trying to add functions to my child theme function.php file but each time i try the site crashes. I dont know how to add the functions the right way. <?php add_action( '...
davidhlyns's user avatar
0 votes
1 answer
26 views

Child theme blocks post from publishing [closed]

I created a child theme to another template, which introduces custom post type with loads of custom fields and specialized functions. Notes: I did not touch anything in the custom post type logic ...
Pavel Janicek's user avatar
0 votes
1 answer
57 views

Making a child theme in order to update the parent theme

I'm really new to Wordpress development and had made a mistake by changing a parent theme for customizations instead of customizing a child theme. Not i cannot use the updates that my theme provider ...
Randunu Dimeshan's user avatar
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 ...
David Esteban's user avatar
0 votes
1 answer
2k views

How to have different site identity logos on each page on Astra Theme [closed]

Original title - Noob here. Wondering how to make use of this Astra theme function / filter to have different site identity logos on each page The function is at line 1471 here (...
ClubShrimp's user avatar
0 votes
1 answer
170 views

change html and css in template files in child theme

I am trying to move my site to WP using a child theme based on twenty sixteen (this is the first time I am dealing with WP). Considering my site html and css, is it possible to incorporate html ...
810311's user avatar
  • 41
0 votes
0 answers
131 views

Block validation failed for `core/pullquote` after adding theme support for editor-color-palette

I added this function to my child theme's functions.php: /** * Adds support for custom editor color palette. * https://developer.wordpress.org/block-editor/developers/themes/theme-support/ */ ...
rjmccallumbigl's user avatar
0 votes
0 answers
58 views

Override parent theme deregister

I have a parent theme that deregisters a script, in my case jquery. It does it like this: function parent_enqueue_scripts() { wp_deregister_script( 'jquery' ); [...] } However, in my child ...
TheKidsWantDjent's user avatar
0 votes
2 answers
114 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 ...
Justin Leroux's user avatar

1
3 4
5
6 7
25