• 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Seans0n

    (@seans0n)

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

    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:
    https://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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcodes problem’ is closed to new replies.