Forums

Shortcodes problem (3 posts)

  1. Seans0n
    Member
    Posted 3 years ago #

    In a new version of WordPress Link Directory, I've added a second shortcode function for a [wplink] shortcode. The existing shortcode was [wplinkdir] which showed pages or categories of links while the new [wplink] should show a single link.

    The problem is that when I activate my plugin I get an error: Plugin could not be activated because it triggered a fatal error.

    Fatal error: Cannot redeclare wplinkdir_wplink_shortcode() (previously declared in seanbluestone.com/public_html/wp-content/plugins/link-directory/link-directory.php:34) in seanbluestone.com/public_html/wp-content/plugins/link-directory/link-directory.php on line 34

    And I'm not sure why. I even wrapped the function in question in an if(function_exists()){ but to no avail.

    I can only imagine it's something to do with the way WordPress handles shortcodes but any help or thoughts are appreciated.

  2. Seans0n
    Member
    Posted 3 years ago #

    Almost forgot, my code is available at: http://pastebin.com/m52766e63

  3. indestiny
    Member
    Posted 3 years ago #

    Plugin admin page:
    Fatal error: Cannot redeclare wplinkdir_shortcodes() (previously declared in E:\www\live\wp-content\plugins\wordpress-link-directory\link-directory.php:115) in E:\www\live\wp-content\plugins\wordpress-link-directory\link-directory.php on line 135

    on page error displays:
    http://pastebin.com/m173c6fd7

    Hope someone finds the solution i think i have the same problem. Latest one from website.

    I have tried deleting the tables in phpmyadmin and reinstalling plugin with no luck.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.