I have a functions.php (with one custom function for redirects) in my child theme, no issues. I guess you’re doing something wrong!
it has to be this part that is causing the problem, any ideas how to make it work called from the child theme folder? i am afraid to do the upgrade to 1.1.2 from 1.1.1 with stuff in the parent them!
‘
function postimage($width,$height) {
$scriptpath = get_bloginfo(‘template_directory’);
$attachments = get_children(array(‘post_parent’ => get_the_ID(), ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘orderby’ => ‘menu_order’));
if (!is_array($attachments)) {
$image = $scriptpath.”/images/empty.gif”;
echo ‘<img style=”border:none;margin:0;” src=”‘.$scriptpath.’/scripts/timthumb.php?src=’.$image.’&zc=1″ alt=”” />’;
}
else {
$img = array_shift($attachments);
$imagelink = wp_get_attachment_image_src($img->ID,’full’);
$image = $imagelink[0];
echo ‘<img src=”‘.$scriptpath.’/scripts/timthumb.php?src=’.$image.’&w=’.$width.’&h=’.$height.’&zc=1″ alt=”” />’;
}
}’
well,to me,It seems the problem with get_bloginfo.
As you are using child theme,put timthumb in your child theme.
then replace this line
$scriptpath = get_bloginfo('template_directory');
with this
$scriptpath = get_bloginfo('stylesheet_directory');
or this
$scriptpath = get_stylesheet_directory_uri();
Both should work
well, i still cannot get this to work! when i upload it in my child theme, it just results in a totally blank page
here is the file if you want to take a look–
http://successiqu.com/communityfiles/functions.php.txt
A totally blank page means there’s an error in your syntax somewhere.
Find the error logs on your server. They should have a line in there saying exactly what the error was.
but, the exact file works from within the bp parent theme, which would suggest not syntax but paths, correct?
You can’t just duplicate functions.php. That means that you have a few functions declared twice and the sidebars registered twice. Start with an empty functions.php file in your child theme folder and only add your custom functions, leaving all the functions from the bp-sn-parent functions.php out.
yeh,Travel-Junkie is right.There should be no clash between the name of functions declared in parent theme’s functions.php and child theme’s functions.php
I learned when trying to override the BuddyPress widget registrations that your theme will use BOTH function.php files… the parent and child. So you may need to unregister the original function and/or use a new function name… etc.