JCHASE11
JCHASE11

Reputation: 3941

Making external php pages dynamic in wordpress

I am using colorbox to load external php files when a modal is triggered. It works great using colorbox's href parameter. I brought it into wordpress only to realize that there are some issues with wordpress and loading via ajax.

When in wordpress, the modal successfully loads, but I want to be able to use wordpress's dynamic tags (bloginfo('template_url'), bloginfo('home'), etc). These will not work in an external page, even if in the theme folder, because wordpress thinks these are just sandard html/php pages outside of wordpress.

How would I enable these pages to work?

Colorbox is simply loading content like so:

$.colorbox({
     href: url
});

On a wordpress page template, I trigger the colorbox like so:

<a href="<?php bloginfo ("template_url"); ?>/lobby.php"> 

I need lobby.php to accept dynamic images and content powered by wordpress. It is still within the theme folder, although its not actually a template. Is this possible? Within each of these external pages, there is no header or footer...just content to load. How can I best go about this?

Upvotes: 0

Views: 667

Answers (1)

Hobo
Hobo

Reputation: 7611

Seems my comment above answered your question; this answer shows how to include WordPress functionality in a standalone PHP page.

Upvotes: 0

Related Questions