Skip to main content

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.

334 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
2 answers
9k 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 ...
André Kelling's user avatar
5 votes
1 answer
75 views

How to move the customizations done in the Editor to my child theme?

Dashboard -> Appearance -> Editor -> 3-dots menu -> Export lets one download a zip file, which contains the folders parts and templates that - according to various online tutorials - ...
anick's user avatar
  • 151
4 votes
1 answer
826 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 ...
Jeff's user avatar
  • 278
4 votes
2 answers
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 ...
lilireed's user avatar
3 votes
0 answers
82 views

Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?

Usually, I can replace the template files and PHP codes of any parent classic theme with child themes. Since block-based theme templates rely on HTML, how can I replace parent block-based theme files ...
Mehadi Hasan Juber's user avatar
3 votes
0 answers
2k 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
3 votes
0 answers
666 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 ...
Abbi Saesong's user avatar
2 votes
0 answers
79 views

How to Use Webpack with WordPress Script Modules and Enqueue a Custom Class

I am working on a WordPress project using version 6.5, which introduced support for JavaScript modules. I have a parent theme that exports a JavaScript class, and I want to import this class in a ...
Nani samireddy's user avatar
2 votes
2 answers
2k views

How to set the background color of a template part (Header/Footer) in Twenty Twentythree?

In Wordpress's shiny new Twenty Twentythree theme, how can you assign a background color to the header or foother template parts? Can this be done in a child theme - through theme.json? Or somehow ...
SePröbläm'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
2 votes
1 answer
670 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 ...
hansfn's user avatar
  • 121
2 votes
0 answers
53 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 (...
benteh's user avatar
  • 121
2 votes
0 answers
758 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 ...
CodeBriefly's user avatar
2 votes
0 answers
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( '...
iSaumya's user avatar
  • 936
2 votes
1 answer
239 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/...
TheWebs's user avatar
  • 1,105
2 votes
0 answers
313 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 ...
dcd0181's user avatar
  • 121
2 votes
1 answer
116 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 ...
Steve's user avatar
  • 1,747
1 vote
1 answer
47 views

Can't disable child theme style

I got problems with my twentytwenty child theme and hope, that someone can help me. In order to optimize my website for speed, I'd like to use critical css as inline code. To do that, I wanted to call ...
Andreas Böttcher's user avatar
1 vote
0 answers
29 views

Trying to insert widget code into theme function

The site I am working on has a function in the theme (Botiga) that creates a wrapper row that displays a sorting dropdown for the items below. The default output is the dropdown displays in the right ...
semidivine's user avatar
1 vote
1 answer
587 views

How can I use AJAX in child theme template?

I'm trying to perform an action with AJAX in a Child theme template in Wordpress. I've looked into many similar issues. However, I couldn't find a solution. I've been dealing with this for about 2 ...
peramsm122s's user avatar
1 vote
0 answers
53 views

Load in wp admin assets from child theme

I started to create a child theme from a BoldThemes theme with custom icons. I am able to see icons when edit directly page, but when try to edit page from wp admin, I've this issue I discovered ...
salsan's user avatar
  • 121
1 vote
1 answer
44 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
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
1 vote
0 answers
34 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
1 vote
0 answers
34 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
27 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
1 vote
1 answer
29 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://...
user2510408's user avatar
1 vote
0 answers
62 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 ...
Cris J's user avatar
  • 11
1 vote
0 answers
157 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 ...
Junior92's user avatar
1 vote
0 answers
44 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 ...
Jesper's user avatar
  • 11
1 vote
2 answers
2k 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 ...
Mikkel Damsgaard's user avatar
1 vote
0 answers
49 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
1 vote
0 answers
51 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
57 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
16 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
1 vote
1 answer
1k 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 ...
Ryflex's user avatar
  • 83
1 vote
1 answer
259 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 ...
Stoinov's user avatar
  • 111
1 vote
0 answers
23 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 ...
VJ.'s user avatar
  • 111
1 vote
1 answer
173 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 ...
Catalin's user avatar
  • 13
1 vote
1 answer
145 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 ...
James's user avatar
  • 11
1 vote
0 answers
410 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 ...
Ayanei's user avatar
  • 11
1 vote
0 answers
29 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 ...
TheKidsWantDjent's user avatar
1 vote
0 answers
323 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. ...
Edwin Raynor's user avatar
1 vote
0 answers
274 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 ...
j.doe's user avatar
  • 13
1 vote
0 answers
2k 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 ...
js4ftw's user avatar
  • 11
1 vote
2 answers
57 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: ...
user avatar
1 vote
0 answers
117 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 ...
Ashish Thakur's user avatar
1 vote
0 answers
2k 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/...
Denver Prophit Jr.'s user avatar
1 vote
3 answers
578 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: ...
Crashy's user avatar
  • 199
1 vote
2 answers
436 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 ...
Null_Error's user avatar

1
2 3 4 5
7