WordPress.org

Ready to get started?Download WordPress

Forums

EG-Attachments
Multiple shortcodes on a page? (3 posts)

  1. wtmann
    Member
    Posted 1 year ago #

    You can't use multiple shortcodes on the same page even when the parameters are different (es. tags, title, etc.). Only the first shortcode gets detected and it is then repeated on the page various times (the number corresponds to the number of shortcodes on the page). However, each repetition has the correct title: only the attachments listed are the same as the first shortcode. Desired behaviour?

    http://wordpress.org/extend/plugins/eg-attachments/

  2. wtmann
    Member
    Posted 1 year ago #

    I found a solution to this problem. It seems like the field $this->attachments is not getting reset after showing a shortcode. I modified the eg-attachments-public.inc.php file and inserted the following

    unset($this->attachments);

    right before

    return($output);

    in the function get_attachments. Afterwards, everything functions as it's supposed to.

  3. EmmanuelG
    Member
    Plugin Author

    Posted 1 year ago #

    Hi

    I am preparing a new version including the ability to display several shortcodes in the same page.

    You can test the beta by downloading the beta version.

    Emmanuel.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic