-
GreenGriotParticipant
Hi All,
Has anyone been able to get this to work in the “functions.php” of a child Theme?
I’m unsure of the correct syntax.
I started with this:but it didn’t work.
It works when I change the lines in the “functions.php” original theme but not in the child. Even when I use an exact copy of the entire original file (with Daniel’s changes of course) as the child theme’s functions file it still doesn’t work.Any Help would be appreciated.
Cheers!
GreenGriotParticipantSorry my Pastebin code disappeared.
GreenGriotParticipantFound it!
Thanks to a WP forum post found here:
For the sake of future beginners like myself the answer seems to be use of the “add_” and “remove_” function references (or “hooks) in the child ‘functions.php’ file. In this case the “add_filter”/”remove_filter” and “add_action”/”remove_action”
When I added the following code to the functions.php of my child theme the override worked perfectly (so far).
<?php
//code to override theme function fixing Image loader problem of 3.5 update
add_action('wp_enqueue_scripts', 'minimatica_register_styles');
add_filter( 'ext2type', 'minimatica_file_types' );remove_action('init', 'minimatica_register_styles');
remove_filter( 'ext2type', 'minimatica_mime_types' );//
More about these hooks and others can be found here in the codex:
http://codex.wordpress.org/Function_Reference/remove_filterhttp://codex.wordpress.org/Function_Reference/add_filter
Hope This Helps!
jmw
ileanaParticipantI registered here just to say Thank YOU!
It works like a charm. Thank you so much!begemotobegemotovParticipanthi guys,
im using minimatica and have the same problem, i read the whole theme, but i can’t find where is “function.php” can anyone show to me?GreenGriotParticipantB:
Functions.php is a file in the themes folder. From the dashboard you will find it when you go to Appearance -> Editor on the far right you will see it listed as “Theme Functions” (functions.php).
Hope this helps
Cheers!
jmw
begemotobegemotovParticipanthey, now i have the same problem like donindovinati
Parse error: syntax error, unexpected T_STRING in /www/begemoto.eu/www/root/wp-content/themes/minimatica/functions.php on line 227now i can’t do anything with the dashboard… can someone send me the whole code on the mail? – [email protected]
begemotobegemotovParticipanti can’t get in editor now… i think that i fucked up my all blog.. am I ?
GreenGriotParticipantIf you can, try activating your default theme (twenty twelve or twenty eleven) and rebuild from there.
Do a fresh install of Minimatica and see if that still works.
Look into creating a child theme for your customizations if you can.The WordPress forum may have the answer to the Parse error
Cheers!
jmwbegemotobegemotovParticipantif i press everyone of the buttons on the dashboard there is this error Parse error: syntax error, unexpected T_STRING in /www/begemoto.eu/www/root/wp-content/themes/minimatica/functions.php on line 227
i can’t use the menus and can’t do nothing
some solution on this problem ?
jdimoParticipantGreat fix!
I had installed this theme at one hosting company and there were no problems. When I migrated it to a different hosting company the Ädd Media”functionality vanished. This edit did the trick. many thanks!shawnhoeferParticipantWorked as advertised, and I must say that this type of pre-emptive support for a free theme is astounding. You are to be commended!
Tagged: Fix issues, Media Uplaoder, wordpress 3.5
You must be logged in to reply to this topic.