WordPress.org

Ready to get started?Download WordPress

Forums

Events
Usage of shortcodes within wp-events messages? (6 posts)

  1. wijgaanhetregelen
    Member
    Posted 1 year ago #

    WP version: 3.4.2
    Plugin version: 2.2.4.1

    My problem is that I cant load [shortcodes] within the loaded event message it just shows [shortcode].

    I use the shortcoder plugin to generate shortcodes.

    maybe i need to put
    add_shortcode('sc', 'shortcoder');
    somewhere in the events plugin?

    ty

    http://wordpress.org/extend/plugins/wp-events/

  2. wijgaanhetregelen
    Member
    Posted 1 year ago #

    after some searching i found

    add_filter('the_content', 'do_shortcode')

    i added this to wp-events/wp-events-functions.php

    now it works but it shows [events_show type="today" /]
    after every used shortcode within wp-events messages.

  3. wijgaanhetregelen
    Member
    Posted 1 year ago #

    it is fixed with

    add_filter('the_content', 'do_shortcode')

    ty

  4. __ __
    Member
    Posted 1 year ago #

    Hi, where did you put the add_filter('the_content', 'do_shortcode') ?
    could you post the section please?

    my shortcodes are like this but I can't get them to work in Events:

    function austria() {
            return '<img class="nationality" src="http://www.lotrdc.com/wp-content/uploads/austria.jpg">';
        }
        add_shortcode('au', 'austria');
    function belgium() {
            return '<img class="nationality" src="http://www.lotrdc.com/wp-content/uploads/belgium.jpg">';
        }
        add_shortcode('be', 'belgium');

    :)

  5. __ __
    Member
    Posted 1 year ago #

    hmm, i've got the shortcodes to work but it's bodged my WP-UI accordion...

  6. __ __
    Member
    Posted 1 year ago #

    Problem solved, using this instead:

    add_filter('the_content', 'do_shortcode', 99);

    the 99 is for the priority - by making a high number it adds the shortcodes after everything else on the page so avoids the conflicts with plugins

    :D

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic