Quantcast
Channel: Topic Tag: plugin | WordPress.org
Viewing all articles
Browse latest Browse all 26892

bcworkz on "Plugin generating virtual pages, issue with the_content not running"

$
0
0

The problem is that there is no content corresponding to the requested page, so the theme's loop never runs and thus 'the_content' filter never fires.

My suggested approach is to create a custom page template which is copied to the theme folder on activation. (Unless you can create a page based on a template not in the theme folder?) A page (post type) is also entered into the DB based on this template as well. A rewrite rule is created to route any requests of the particular form to this page.

This page template can grab the needed parameters from either query vars, URL parms placed by the rewrite rule, or by parsing the requested URL directly. From this data, the content is output. As a page template, all the theme styling, headers, footers, etc. will be incorporated.

There is no doubt many possible approaches, this is just an idea that came immediately to mind.


Viewing all articles
Browse latest Browse all 26892

Trending Articles