Thanks, Mark. I'll try the ID trick in a moment. To answer your question, along with posting code, here is where I am...
I have a page that has a postloop function. What it does is initially look for 3 page id's and, if it finds 1 of the 3 pages is loaded, it creates order forms. Outside of that loop, I include a page for calendar functionality (using a 3rd party calendar script)
so I include that page such as
I displayed it BEFORE the post_loop.
In that page, I try to find 3 types of tokens:
[total_events=5] // that # is hard coded when a user creates a page, it can be 5, 10 or anything they want.
So calendar_page.php runs the functionality to find the tokens, remove them from visibility, and strip the values so it can display calendar data. It works, but it's slooow.
I also include that code in another post_loop type function (different name) so I am using TWO filters, one for main.php and
one for calendar pages. I wonder if that is causing issues?
Anyway, here is some of the code:
$thePostID = $post->ID;
# Some code to determine variables for the calendar script
# Following code is to determine values in the TOKENS
# Let's do it now for Events
# SAME CONCEPT - Explode/etc to find values in tokens
# Will save you from reading all of the code..
# I then use the rest of the code to find other vals I need
# that are not coming from tokens.
# Now, we create url's that we can include which involves
# finding a url with the 3rd party calendar script
# so we can display events based on the tokenized data
# in this page's post
$request = new WP_Http;
$result = $request->request( $url1 );
$result2 = $request->request( $url2 );
$result3 = $request->request( $url3 );
# At this point, we just have to tell the script to
# replace the post's content with the added 3rd party
# calendar data, which was pulled from the 3 url's above
# Then we return $content and add the filter.
So it's main.php loading the normal pages, having it's own post loop and filter for 'the_content'. Inside this page, outside of the loop (at the bottom, after the filter) I include the calendar page
The calendar page uses explode/php functions to strip out the values in tokens, I create the urls (dynamic urls) to display 'event data' for each page and then I add that to another filter for 'the_content'
TY for your time!