WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Maximum length of shortcode replacement? (3 posts)

  1. Mikko Saari
    Member
    Posted 4 years ago #

    Does anybody know the maximum length of a shortcode replacement? I've tried to create my own shortcodes and have run into some problems when the content I'm placing in the entry is too long. I'm talking about tables with over hundred lines and an auction listing of over 200 entries. All I get is a blank entry.

    I've tried it two different ways, both with regular shortcode functions and by creating a filter function that replaces the shortcode appearances in the_content. In both cases the results are the same: I can assemble the data and if I echo it, it turns out fine (with some complications, but it works). If I try to return it like I should, I get a blank entry.

    Does anybody have a clue of what's happening?

  2. stvwlf
    Member
    Posted 4 years ago #

    Sounds like you should be using a custom page template with some custom PHP code in it rather than shortcodes.

    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

  3. Mikko Saari
    Member
    Posted 4 years ago #

    Thanks, excellent point. Didn't think of that...

Topic Closed

This topic has been closed to new replies.

About this Topic