[wp-hackers] P2 in a subfolder
Nikola Nikolov
nikolov.tmw at gmail.com
Fri Sep 13 14:05:46 UTC 2013
What I've done before(but is most-likely not the best solution) is to ping
the other site with a request to load only the header, or only the footer(I
had a couple of functions that do that) and then store the HTML in a
transient for caching. If you don't have any dynamic things in the
footer/header, or if they change infrequently, you can probably try this
approach - otherwise, you'd have to figure-out a different way to do that.
I can give you some sample code if you're interested.
On Fri, Sep 13, 2013 at 5:02 PM, David Ernst <david at ernsts.us> wrote:
> Would a symlink from htdocs/subfolder/wp-content/themes/p2/footer.php
> to htdocs/wp-content/themes/twentytwelve/footer.php work? Seems like it
> would have trouble knowing which wp_terms to use for menus.
>
>
> On Thu, Sep 12, 2013 at 7:47 AM, David Ernst <david at ernsts.us> wrote:
>
> > Seems simple enough, thank you for the suggestion, Shea! Are there also
> > straightforward strategies to reuse certain theme aspects, e.g. header
> and
> > footer?
> >
> > Cheers,
> > David
> >
> >
> > On Thursday, September 12, 2013, Shea Bunge wrote:
> >
> >> You should make your P2-powered area a separate WordPress install. Then,
> >> you can set the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE constants
> in
> >> wp-config.php. See
> >>
> http://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tablesformore details.
> >> > Date: Thu, 12 Sep 2013 00:44:30 -0400
> >> > From: david at ernsts.us
> >> > To: wp-hackers at lists.automattic.com
> >> > Subject: [wp-hackers] P2 in a subfolder
> >> >
> >> > Short question:
> >> >
> >> > What's the smartest way to configure a P2 child-theme to a subfolder
> of
> >> my
> >> > root (TwentyTwelve-based) WordPress install? This new subfolder would
> >> > need its own wp_posts table but use the same wp_users.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > The details:
> >> >
> >> > The current set up uses a child-theme of TwentyTwelve. There's a
> static
> >> > homepage and most of the site is organized around Pages. So
> >> > foo.com/bananais the permalink for the Page 'Banana'. There are about
> >> > 40 or so Pages at
> >> > the moment.
> >> >
> >> > And foo.com/blog is the current Blog Index, so the Post 'Pineapple'
> >> lives
> >> > at foo.com/blog/pineapple . There are only a few posts right now, and
> >> only
> >> > admins can post.
> >> >
> >> > WooCommerce is also installed, using the /shop/ subfolder. It treats
> >> > eCommerce orders as a custom post type.
> >> >
> >> > Then there's another custom post type 'fish' with some
> >> > elaborate accompanying wp_postmeta that's rendered and semi-editable
> on
> >> > foo.com/fishtank, using a htaccess rewrite + custom Action URL. Each
> >> user
> >> > can only see the fish-type posts they created.
> >> >
> >> >
> >> > Now what I'd like to do is create a discussion space at foo.com/talk/
> .
> >> > Unlike the current blog index, all users (& maybe guests? Haven't
> >> decided
> >> > yet) should be able to post here. The objective is for this to have a
> >> > real-time chat room feel, but like a forum also allow for longer
> >> > posts, keep an archive, and provide links to individual threads.
> Matt's
> >> > post "How P2 Changed Automattic" <
> >> > http://ma.tt/2009/05/how-p2-changed-automattic/> inspired me to think
> >> P2
> >> > could work well.
> >> >
> >> > Because this may generate tons of content, and the current wp_posts is
> >> > already pretty busy, I'd rather give it its own wp_posts table, if
> >> possible.
> >> > Is this an unnecessary concern and over-complicating things? I'd still
> >> like
> >> > to use the current wp_users table.
> >> >
> >> >
> >> > Does this setup make sense? Has it been done before? Am I being crazy?
> >> Is
> >> > there documentation for these sort of scenarios? Would it be much
> >> simpler
> >> > to use a fresh install of WordPress in a subfolder? Is there a sane
> way
> >> to
> >> > share wp_users between these two spaces?
> >> >
> >> >
> >> > I'd appreciate any thoughts, concerns, and suggestions :-)
> >> >
> >> >
> >> > Much thanks,
> >> >
> >> > David
> >> > _______________________________________________
> >> > wp-hackers mailing list
> >> > wp-hackers at lists.automattic.com
> >> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >> _______________________________________________
> >> wp-hackers mailing list
> >> wp-hackers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list