All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
16 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 ...
0
votes
1answer
29 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 (...
0
votes
1answer
21 views

Replace theme function

I am a PHP developer but I am new to WordPress so there may be simple things I don't know how to do. I made a change on a theme file to change the behavior of the theme. Only changed 6 words and ...
0
votes
1answer
33 views

WordPress redirect JavaScript and CSS using function.php/child theme

Is it possible to redirect JavaScript and CSS calls using something function.php for example? I used WP Hide & Security to rename some of my plugins and it has functioned well but it clashes with ...
0
votes
1answer
27 views

Where do I go to edit this area? [closed]

I need to edit the area shown in my photo. I am using a child theme. I am unable to ask the question to the theme's website as I don't have a proper subscription. I have tried looking at both the ...
1
vote
1answer
198 views

Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons

I’m trying to change the svg of the ellipses for the mobile menu. It’s called in this file: template-functions.php so I did a hook on my child theme functions.php to replace it, like so: function ...
0
votes
1answer
44 views

Setting Up Child Theme To Take Priority

I'm trying to setup my child theme style sheet with a premium theme I have bought but I'm having a nightmare trying to get to work properly and efficiently. I have downloaded the theme's child theme ...
0
votes
1answer
39 views

How to include any template using Shortcode fuction?

function custom_code(){ return include( get_stylesheet_directory() . '/custom-template.php'); } add_shortcode('custom_shortcode','custom_code'); As you can check above I want to include a ...
0
votes
1answer
66 views

Copyright info change - Corporate Plus Theme PHP [closed]

I have been trying to do this for hours now but just can't get this to work. What I am trying to do is change the copyright info in my wordpress theme which is being pulled from wp-content\themes\...
1
vote
2answers
140 views

Proper way of using functions in action hook?

I am wondering if the below logic is correct and if certain circumstances should be present for it to work, since in some cases it does not seem to be working. The example below is quite simple. Let'...
0
votes
3answers
70 views

How do I create a child theme from PowerMag theme

I am using PowerMag 2.5 as parent and can't seem to find a way to get a working child theme. As far as I am now, I can only extend css in the style.css but as far as overriding, nothing has worked. ...
0
votes
1answer
11 views

Change default color scheme in twentyfifteen child theme?

I read the previous ask about this. And tried renaming my scheme to "default" and it didn't work. I am implementing the child theme on 50+ blogs on a network and I would like to just click "Activate" ...
0
votes
1answer
89 views

Create New User Custom Field not Saving

I've added a function to my child-theme to add a new field in the Add New User section so that you can select if the member is either just a member or candidate etc : function ...
3
votes
1answer
116 views

Overriding core functions in child theme

Is it good practice to use children functions.php to override parent core functions? Example in Storefront theme : Core function if ( ! function_exists( 'storefront_primary_navigation_wrapper' ) ) {...
0
votes
1answer
51 views

How would I correctly implement a new if statement in a child functions file?

I want to make some changes to some Meta within an if statement on a parent function.php file and am doing so via child. The following is a snippet of the parent code: if( !function_exists('...
0
votes
1answer
2k views

Changes to functions.php not working

I am trying to make changes to my functions.php file. I have just set up my child theme for the Sydney theme, and have tested the stylesheet and that is working fine. I am looking to make changes to ...
1
vote
1answer
92 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
2answers
441 views

Wordpress child theme fails to override parent navigation menu in /inc/structure/header.php

I'm fairly new to Wordpress. I'm using the shop-isle theme that has a default navigation menu. I'm trying to override this with a fancy ‘Ubermenu’ plugin but the default collapse symbol keeps ...
2
votes
3answers
350 views

override parent theme configuration in child functions.php

Hope someone can help, am looking for some suggestions on how to override/replace some functions that are loading in a parent theme and move them into the child theme so we can make alterations to the ...
1
vote
0answers
306 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
1answer
51 views

Best practice when altering a parent theme function inside a child theme?

So Im not entirely sure what the best way to accomplish this task is exactly. I tried out some things just to see what worked but I have no idea if how I accomplished this task is the most appropriate ...
-1
votes
1answer
74 views

Problem with Child-Theme using of foundation-framework [closed]

I have created a child theme. The parent theme uses Foundation-Framework. I also have included foundation framework to my child theme and trying to add a simple navbar with dropdown but the dropdown ...
4
votes
1answer
430 views

How to override an unpluggable parent theme function?

I have a PHP template in my child theme that calls a function ale_filter(), via <div class="articles"> <?php ale_filter($_POST);?> </div> The function ...
0
votes
1answer
368 views

Parent theme styles overriding child theme CSS [closed]

I am having some trouble getting my child theme to work perfectly. I have successfully created a child theme based on the Flexia theme. I have made child themes before but not come across this issue ...
0
votes
1answer
170 views

How to override a non pluggable and non hookable function in a Wordpress parent theme?

My parent theme has some bugs in a function I then want to override in my child theme. The thing is it is neither pluggable and hookable. It is just defined like so : // no if(!function_exists()) ...
1
vote
1answer
601 views

How to make child theme inherit parent custom theme options [closed]

It's extremely possible this question has been answered before, but I'm not 100% sure of my terminology. The parent theme in question is a premium theme. One of the things it does is offer custom ...
2
votes
1answer
560 views

Using the child theme functions.php to change the customizer.php on parent theme

I'm trying to add a second logo option to the customizer.php of the parent theme using the functions.php from the child theme. But, I'm getting a 500 Internal Server Error. What am I doing wrong? ...
-1
votes
1answer
42 views

Child Theme not working - CSS gone

I'm using the Twentyeleven theme for my new site. I created a child-theme so I can modify the theme and not have my changes overwritten. But once I activate my child-theme the whole styling is gone. I ...
1
vote
1answer
3k views

Add footer.php to Wordpress child theme

So I am using the theme of 'Mesmerize' I have created a child theme but want to change some of the footer php within the child them so when there is a theme update the changes done reverse. This is ...
0
votes
1answer
127 views

Will dequeueing in child theme functions.php file prevent Google Fonts from loading?

I’m using the Escutcheon theme, version 1.0.8. After searching through all of my theme's files, the only place that I see Google Fonts referenced is in functions.php. Is dequeueing Google Fonts in ...
2
votes
2answers
1k views

Change parent theme file function in child themes functions.php

im trying to understand how Action Hooks and Filters work and have this example i want to edit This function is in a parent theme framework php file: public function formatArticleCat01( $...
0
votes
2answers
109 views

Child Theme not loading multiple stylesheets

I have little experience with creating a Child Theme. Just want to make some changes to css on the website. When I use the inspect mode to see which CSS was being used, I saw it was still linking to ...
0
votes
1answer
120 views

Enqueuing latest version of jQuery into a child theme returns a blank screen

Wordpress beginner here. I created a child theme and I'm trying to enqueue Bootstrap 4 inside the functions.php file. From my understanding, if I want to enqueue Bootstrap properly I need to enqueue ...
0
votes
2answers
449 views

overwrite code snippet from parent to child theme

I'm trying to overwrite following code in the child theme. I want to load file /inc/soundtheme-admin.php from child folder. I copied same code snippet in child-theme/functions.php and also copied the ...
1
vote
1answer
6k views

Copyright info change in Theme Child PHP

Below is the file where the information is pulled from. I have tried adding the /inc folder to the child theme and adding the template-tags.php with the changed but this does not make any affect. /...
0
votes
1answer
80 views

Set up functions to be overridden without using function_exists() by short-circuiting them?

A few years ago I read an article about short-circuiting functions with apply_filters() rather than using pluggable functions via function_exists(). I love the idea because of how flexible it is- I'm ...
0
votes
1answer
288 views

Including admin-options.php file in Child Themes

My theme uses the following in functions.php require_once get_template_directory() . '/includes/admin-options.php'; I want to override this with my own version of the admin-options.php file, which ...
0
votes
3answers
289 views

Load custom css in functions.php causing library issue

I'm loading custom css stylesheet in my child theme 'functions.php' using this code if (ICL_LANGUAGE_CODE == 'ar') { ?> <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ...
0
votes
0answers
55 views

Modified functions.php in Magazine Pro theme of Genesis. 500 error

I made a slight change in my functions.php file, magazine pro child theme of Genesis framework. Now I'm unable to update the file and the site doesn't load. All I wanted to do was customise my site ...
0
votes
1answer
76 views

Unable to point the child theme directory even using get_stylesheet_directory()

I am developing a child theme based on storefront as parent theme. I am trying to include files in child theme functions.php file as: require_once get_stylesheet_directory() . '/inc/_customizer.php'; ...
0
votes
1answer
173 views

Help with is_page() and calling css for specific pages in a Child Theme

I'm building a child theme of Newspaper 7, and I'm trying to call a specific stylesheet for certain pages, however is_page() isn't working for me. What should I change in my code to be able to do what ...
1
vote
1answer
42 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
4answers
712 views

Child theme - copied some files from parent to child website still uses parent files

I'm having some trouble with my child team and was wondering if anyone would know what can I do regarding my issue. I have created a child theme from this theme: https://en-gb.wordpress.org/themes/...
0
votes
2answers
596 views

How to edit/replace Parent functions.php function in Child Theme to add “Walker” class

I'm using the theme "Tesseract" as a parent theme, and I'd like to use the walker class to get menu descriptions. However, I am having trouble figuring out how to edit the php, because I don't know ...
0
votes
1answer
384 views

How to modify files inside wp-includes directory in wordpress

I want to modify wp-includes/general-template.php function _wp_render_title_tag() {} Need to allow some limit to title tag, if title of the page will be more than 10 character then it should be ...
0
votes
1answer
437 views

Child theme function.php causes fatal error

When I copy an exact copy of the function.php file to the child theme folder I get this error. Fatal error: Cannot redeclare archi_theme_setup() (previously declared in /home/desi3442/public_html/wp-...
0
votes
2answers
490 views

Understanding WordPress child theme custom JS loading

After hours and hours of trying i can't get my head around it, I'm trying to wp_enqueue_script my custom js but WordPress is always looking for it in the parent theme folder, here is what i have tried ...
0
votes
1answer
52 views

uninstall a theme programmaticlly

I'm working on a plugin that create, install, switch between child themes. But I have a problem that my plugin creates just 2 or 3 child themes ( Is there any limit in creating child themes?). So I'...
0
votes
2answers
2k views

Removing “Powered by” footer using child theme PHP [closed]

I'd like to remove the "Powered by Wordpress" custom link in the footer. I want to do this using action hooks/filters in the child theme's function.php file. I don't want to use CSS (which just ...
0
votes
1answer
2k views

get_template_directory_uri() links to child theme not parent

I have created a child theme of a parent theme which shows correctly on wp theme selector and activates. I have created a style.css of said child theme with the following meta information: /* Theme ...