Forums

[resolved] Can not use two shortcodes in one Plugin (4 posts)

  1. mnewmedia
    Member
    Posted 1 year ago #

    Hi, i made a Plugin with a slider function with a shortcode this worked great.
    I decided to add a second function in with a second shortcode in the same Plugin - and this second shortcode makes doesn't matter where i place it an Fatal Error.

    Fatal error: Call to undefined function add_shordcode()

    Does anybody now whats the problem?

    [code moderated - please use the pastebin for any code over 10 lines]

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    a spelling mistake:

    this add_shordcode("lili", "pacc"); should read add_shortcode("lili", "pacc");

  3. mnewmedia
    Member
    Posted 1 year ago #

    aaaaaaaaaaaaaaaaaah
    Spending soo much time for this stupid mistake =)

    Thaaanks a lot!!

  4. akarmenia
    Member
    Posted 1 year ago #

    Make sure that in wp_config.php you have WP_DEBUG set to TRUE. This will turn on error reporting and you should see a lot of warnings and errors pop up. Most people coding in PHP tend to avoid these, and they shouldn't because they can be insightful for finding bugs etc.

Topic Closed

This topic has been closed to new replies.

About this Topic