Tagged: child theme
-
AuthorPosts
-
January 5, 2015 at 8:25 pm #375296
Hi,
wir schließen im Backend in den Theme Optionen den Punkt Demo Import und Theme Update komplett aus.
Wir wollen verhindern, dass der Kunde etwas macht, was seine Seite eventuell zerstört.
Über das auskommentieren in der auto-updates.php und in der register-admin-options.php kein Problem.
Leider funktioniert das nicht im Child Thema wenn ich die Datei mit der auskommentierten Zeile in der selben Ordnerstruktur dort hinterlege.Gibt es dafür eine spezielle Funktion?
Gruß
BiggyNachtrag: Die custom.css wird auch im Child Theme eingebunden obwohl sie leer ist. Die custom Style Anweisungen stehen ja in der style.css im Child. Kann man die custom.css im child ausschließen (wp_deregister_style ?)
- This topic was modified 9 years, 10 months ago by Biggy.
January 6, 2015 at 4:31 am #375459Hi Biggy!
I think in this article you could find the solution for it: http://www.cryoutcreations.eu/wordpress-themes/wordpress-tutorials/wordpress-child-themes/4
Best regards,
AndyJanuary 6, 2015 at 12:48 pm #375628Hi Andy,
we know this way but this is not successful.
We include this function in the child functions.php
function child_remove_styles() {
wp_deregister_style(‘avia-custom’);
}add_action(‘wp_enqueue_styles’,’child_remove_styles’);
Test it…you will have still the custom.css in your head area
By the way…we use php 5.5
Regards
BiggyJanuary 7, 2015 at 7:20 am #375997Hi!
Please try to use this instead:
add_action('init', 'avf_remove_custom_css', 10); function avf_remove_custom_css() { wp_deregister_style('avia-custom'); }
Best regards,
IsmaelJanuary 7, 2015 at 12:05 pm #376072Hi Ismael,
we try it…. but the custom.css was still in the head area.
But we include this function:
add_action( ‘wp_print_styles’, ‘child_overwrite_styles’, 10 );
function child_overwrite_styles() {
wp_deregister_style( ‘avia-custom’ );
}
And now custom.css is not more in the head area!And own files from the parent theme in folders inside the child folder are not active!
For example …. framework/php/auto-updates/auto-updates.php …. In this file we comment out line 117.
This is the navigation in the backend theme options.
In the wp codex http://codex.wordpress.org/Child_Themes#Template_Files you can read the rules.
But we have no chance to change anything.May be …. Are we have to change the Template Hirarchy?
I think it is only possible to change the frontend files … and not more?Regards
Biggy- This reply was modified 9 years, 10 months ago by Biggy.
January 8, 2015 at 4:51 am #376617Hi!
Yes, most of the files that can be modified on a child theme are template or frontend files. There are core files that cannot be overwritten using a child theme, one example is the framework folder. You can either use filters and action hooks if it’s available.
Cheers!
IsmaelJanuary 8, 2015 at 11:03 am #376696Hi Ismael,
Thanks for your help. That’s what we know!
We use filters in the child function for changes.
You can close this topic.Regards
Biggy -
AuthorPosts
- The topic ‘Child Theme Änderungen im Parent Theme’ is closed to new replies.