WordPress.org

Support

Support » Plugins and Hacks » Operation of WP page generator

Operation of WP page generator

  • Hi there,

    I have a function that essentially replaces a custom quicktag such as <!–show 50 things–> with, well, a whole lot of HTML say, a list, of 50 things.

    Now…
    What I want to be able to do is paginate the list of 50 things. WordPress lets you paginate normal posts with <!–nextpage–> so I figured hey, what if I echo’d out that after say, every 10 items.

    However, the pagination must take place before my content is generated, because all I end up with is a list of 50 items with <!–nextpage–> comments in the HTML.

    Not very paginated.

    My question is, is it possible to force a re-parse of quicktags somehow? Specifically the ones responsible for pagination?

    My plugin returns $content as is the usual way, so being able to hit it again with a quicktag parsing function would be awesome.

    Kind regards,
    Denyerec

Viewing 1 replies (of 1 total)
  • Is this a one-shot static list (i.e., you could process at save time), or is it a completely dynamic animal (i.e., every pageload)?

    If the former, well, hooking the save code should be doable (I’ve never tried, but there’s a lot of make-static stuff around…).

    If the latter, you’d probably need to hook ‘the_posts’ filter (which executes in classes.php). You’d want to process the content of each post (possibly excerpt?) in-place, inserting your nextpage breaks.

    I do something like the latter in custom code, but it is actually just ‘enhanced nextpage semantics’ for naming pages, rather than trying to insert extra pagebreaks. Should be pretty similar overall.

    -d

Viewing 1 replies (of 1 total)
  • The topic ‘Operation of WP page generator’ is closed to new replies.
Skip to toolbar