Archived

This topic is now archived and is closed to further replies.

  • 0

Resolved Pagelines Customize Error

Question

Posted · Report post

I wanted to add social media info to the barnding section. When I added a hook for just the twitter follow button I tested it and it was fine. I added the hook for a facebook like button and it gave me the following error:

Fatal error: Cannot redeclare follow_twitter() (previously declared in /home/content/30/10005630/html/db/wp-content/plugins/pagelines-customize/functions.php:49) in /home/content/30/10005630/html/db/wp-content/plugins/pagelines-customize/functions.php on line 57

The entire site crashed and I had to remove Customize plugin by ftp. Line 57 delared "fb-like()" not "twitter_follow()" as the error shows. I used WP editor to make the changes. Did I do something wrong or is this a fluke?

Thanks

Share this post


Link to post
Share on other sites

3 answers to this question

Posted · Report post

In php you can only declare a function once then use it as many times as you like. Looks like your declaring a function twice. When making custom functions always use a unique name don't just copy and paste.

Share this post


Link to post
Share on other sites

Posted · Report post

I thought I pretty much declared two serate functions with unique names. Maybe follow_twitter is declared somewhere else and I do not know it. I will make the function names very unique from now nd see how that goes.

Share this post


Link to post
Share on other sites

Posted · Report post

The topic was marked as resolved, if you require additional support, please reply and we can re-open the topic.

Share this post


Link to post
Share on other sites