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.

310 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
2answers
22k views

Overriding Plugin Template Files with Child Theme

So hopefully a simple question. I have a child theme installed and have been able to successfully override changes to a .php file that is held in my theme files by uploading it to my child theme. If ...
6
votes
1answer
309 views

Theme Customization API and child themes

I've recently developed a parent theme that makes heavy use of the Theme Customization API. Is there an easy way to port these settings when a user activates one of my child themes? Currently, the ...
6
votes
2answers
6k 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
1answer
484 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 ...
4
votes
2answers
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 ...
3
votes
0answers
239 views

replace parent theme images in child theme

My images are found in the parent theme in this folder directory structure: public_html/wp-content/themes/listingpro/assets/images I tried placing replacement images with the same name in the ...
2
votes
1answer
520 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 ...
2
votes
0answers
49 views

Altered media sizes (in dash), not updating to existing images/posts

(I have searched but not found a satisfying answer – bear with me). I have a client that has a website with 1500 posts. Each post consists of ONE image, no text. I have changed to the Oria theme (...
2
votes
0answers
669 views

unzip a folder on specific location and delete the zip file

After the lots of search. I am deciding to post my question here. Basically i want to upload a zip file in my wordpress site from my admin panel. And also extract this file to specific location with ...
2
votes
0answers
1k views

Overwrite Parent Theme add_image_size in Child Theme

I'm using a child theme of a parent theme. Now on my parent theme, theveloper adds some custom image sizes like this - if ( function_exists( 'add_image_size' ) ) { add_image_size( '...
2
votes
1answer
181 views

child theme inherticance and php autoload

I wrote this method in a parent them that will auto load a class based on the class name, thus if the class name is: SomeFolder_Folder_Folder_Class.php then it will convert that to: SomeFolder/Folder/...
2
votes
0answers
302 views

Checking for page templates in child theme

I have a simple problem I'm hoping someone can shed some light on. I have a child theme with a custom page template and I'm simply trying to check weather or not the template is in use. Under normal ...
2
votes
1answer
108 views

iPhone Safari full size & PC versions different

This site displays the correct logo at top left of the content in Chrome, but displays the incorrect logo in Safari on an iPhone, at full size browsing. The incorrect logo says "Dandelion". The ...
1
vote
0answers
17 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 ...
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 ...
1
vote
0answers
325 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 ...
1
vote
0answers
18 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 ...
1
vote
0answers
14 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 ...
1
vote
1answer
17 views

How do I call in a category title on a category page in a child theme?

I would like to pull in the Category Title as an H1 tag, but I don't know if it is possible to do without modifying the Parent Theme. For example I would like the category for this page [https://...
1
vote
0answers
21 views

Is it possible to add a ribbon in the background of h1 on every page?

I want to customize my h1 and to put a ribbon in the background like in the example bellow. Example: https://css-tricks.com/snippets/css/ribbon/ I'm not quite sure if/how it's possible to make all ...
1
vote
0answers
64 views

How to filter, restrict and return posts based on custom user meta information

On this online platform project i have requested all users to add in their school title. In the user dashboard there is a posts section which currently shows all posts. I want to only show posts that ...
1
vote
0answers
24 views

How to first edit in local Wordpress editor on page and the add code?

I started a local WordPress site using DesktopServer. (Atom for coding). And I want to start creating the new website by first creating a "page" in local WordPress and creating a basic layout, and ...
1
vote
2answers
713 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 ...
1
vote
0answers
24 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::...
1
vote
0answers
38 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 ...
1
vote
0answers
45 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 ...
1
vote
0answers
14 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 ...
1
vote
1answer
255 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 ...
1
vote
1answer
104 views

How to overwrite core/libraries/vendor template with child theme

A theme that I am using is overwriting the woocommerce templates with files in theme/core/libraries/vendor/woocommerce/templates folder. I tried to overwrite some minor stuff by following the best ...
1
vote
0answers
20 views

Child Theme disable customizer defaults

I am trying to extend twentyseventeen theme. I want to achieve two simple goals. No custom header image Don't show the Title and tagline by default. But I would like to keep those options available ...
1
vote
1answer
38 views

Child theme does not load all style

I know this thing has been posted several times now, but I can't figure it out. I am asking for your help. I have created theme child before, for other WordPress themes, but this one is giving me hard ...
1
vote
1answer
125 views

Why is functions.php file in child not initializing and over-writing parent?

Good evening, I had some modifications in functions.php file to complete on my current wordpress website development. I have completed new code within the file and uploaded my edited function file ...
1
vote
0answers
263 views

Buddypress - Add the post_id in the bp_activity_add function

I would like to create an post-based contextual activity stream to create an activity that is related to the post where we wrote it, I almost done. I’m using a shortcode on the function.php to show ...
1
vote
0answers
20 views

Include custom JS without child theme

Is there a way to include custom JavaScript on a website, without using a child theme? I am currently working on a customers website. Unfortunately he somehow managed to make it kind of impossible to ...
1
vote
0answers
316 views

Show the content that is after the excerpt using child theme

How do I set a value for $stripteaser using the functions.php file in a child theme so that when the_content() is called on post pages only the post exerpt is shown? I have a theme that I am using. ...
1
vote
2answers
48 views

Why is it needed to enqueue parent stylesheet in child theme?

WordPress documentation says to enqueue parent stylesheet in child theme: add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); function my_theme_enqueue_styles() { $parent_style = '...
1
vote
0answers
231 views

Can I add customizer sections in the Twenty Seventeen theme?

I am trying to add another section to the twenty seventeen customizer theme. I have a functions.php in a child theme of the Twenty Seventeen wordpress theme. However, it does not seem to add it. Am I ...
1
vote
0answers
1k views

Override file inside inc in child theme

I want to make a child theme of hesita. This theme has templates in the inc/sections folder and I would like to load these from my child theme instead of from the main theme. Tried to copy the files ...
1
vote
2answers
31 views

changing blog title to an image using filter function in child theme

Hey guys i'm trying to change the blog title to an image. This is what I'm trying to achieve I tried adding this code to the css and it's working. .rh-content { text-indent: -9999px; background: ...
1
vote
0answers
97 views

Add custom function to child function.php

I am trying to add a custom function to remove a particular category from my blog page of the website. I got the code right in parent function.php but when I try to add the same code to my child ...
1
vote
0answers
1k views

How can I make this Advanced Custom Field Save & Store local json work?

I call this function from theme function.php and ACF still will not save local json. The acf-json folder is 0755 and correct user/group. <?php include_once( ABSPATH . 'wp-admin/includes/...
1
vote
3answers
527 views

Child theme problem

I'm trying to add a child theme on a website, I created the folder called mythemename-child, I created the style.css file with this information inside: /* Theme Name: Mizrahi-child Theme URI: ...
1
vote
2answers
350 views

Switching to a child theme

I am using the Zephyr theme for my site, but want to switch to a child theme as this seems to be recommended in case the theme is updated. I am worried I will lose my customization etc. Are there ...
1
vote
1answer
353 views

How to create a parent theme for accesspress parallax theme?

So, I'm currently using an AccessPress Parallax theme and I've created a child theme, however, it shows there is an error. It says "The parent theme is missing. Please install the "accesspressparallax"...
1
vote
2answers
86 views

Can´t access child theme´s scripts dependencies found in parent

I´ve been struggling with this for nearly a month now and still couldn´t find anything at all on how to do this! Not here, not in Quora, not through many different advanced Google search queries... ...
1
vote
1answer
46 views

Please Explain the Importing Process of Multiple Stylesheets for Child Themes

So I want to create a child theme for the premium theme Newspaper 7. I have read several tutorials and I have read through several answers on here, but I still do not understand the process of ...
1
vote
0answers
135 views

Show woocommerce categories on my theme menu styling

I am modifying a Theme I purchased since it is not prepared for woocommerce. It has an option to select a megamenu from a dropdown list on the menu where it says not megamenu. This is the code I find ...
1
vote
0answers
208 views

Replace part of a parent-theme customizer in the child-theme

I'm created a child-theme of the OnePress theme and would like to update a part of the inc/customizer.php function. Specifically, the theme customizer adds the following control: $wp_customize->...
1
vote
0answers
29 views

Development of new theme and rollout on multisite

I'm currently using Wordpress MU with 100+ websites. I have 5 active custom theme and one of my theme is being totally redesign. Most functions are preserved in the new version and there is a few ...
1
vote
0answers
133 views

How to override p2 breathe theme plugin in content template file?

I'm experimenting with a theme, P2 Breathe, the first o2-enabled theme that adds functionality like front-end posting. One difficulty is that when the plugin is enabled, most of the changes that I ...

1
2 3 4 5
7