[wp-hackers] How to load a sidebar/footer from non-WordPress environment
philip at philipwalton.com
Fri Apr 1 00:51:22 UTC 2011
I'm building a site for a client that is primarily in WordPress but
contains a donation section built with the PHP framework Yii.
Visually, when a user is on the donation page(s), I'd like to still show
the sidebar and footer from the main WordPress blog to maintain
consistency. But, obviously, I can't simply include those php files or
call get_sidebar() from another application.
I know there are several ways to accomplish what I'm wanting: I could
use ajax, e.g. $.load(), or create a page template and file($url), but
I'm looking for a better (and faster) way. I'm wondering if other folks
have encountered this issue, and what they have done.
If no good solutions exist, I might just write a plugin that caches
theme parts periodically or after certain updates are made.
On 3/31/11 10:24 AM, Otto wrote:
> On Thu, Mar 31, 2011 at 7:34 AM, Steve Taylor<steve at sltaylor.co.uk> wrote:
>> At some point the numeric slug at the end is being split off from the
>> request URI and placed in the 'page' request var.
> Yes. A number at the end of a URL is considered to be a page number, not a
> separate page. Basically, WordPress does not support all numeric slugs well.
> - Does anyone know if the above hack might cause others problems along the
> Probably will, yes. It's something that you'll have to keep up to date,
> basically. You might be better off using a known and supported plugin:
> - What's the difference between 'page' and 'pagename' in the query
>> vars? Might I be better off understanding the rewrites and adjusting
>> the rules?
> Page is the page number. Like Page 1, page 2, etc. If you use
> <!--nextpage--> in the post to split it up into pages, then the URLs will be
> like example.com/slug/1 and example.com/slug/2 and so on. Your year as the
> slug is being interpreted as page 2011 of the brazil page.
> - Are there any plans to properly address the issues with numeric
>> slugs in WP? I don't want to be spending time with every WP release
>> hacking this site to work properly. In the long run, am I looking at
>> having to recode the whole site to work without numeric slugs?
> There has been discussion about changing this sort of thing. See:
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers