[wp-trac] [WordPress Trac] #19296: add/apend templates 'transparently' via plugin to currently active theme or child theme.
WordPress Trac
wp-trac at lists.automattic.com
Sat Nov 19 03:23:18 UTC 2011
#19296: add/apend templates 'transparently' via plugin to currently active theme or
child theme.
-------------------------+------------------------------
Reporter: anointed | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: |
-------------------------+------------------------------
Comment (by anointed):
@dd32 this part doesn't matter much, but will show how I was attacking the
problem you explain:
example of archive-forum.php
{{{
<?php do_action( 'page_pre' ); ?>
<div class="tumbleboard" role="archive-forum">
<?php bbp_get_template_part( 'bbpress/content', 'archive-forum' );
?>
</div><!-- /.tumbleboard -->
<?php do_action( 'page_post' ); ?>
}}}
I use a plugin admin page where the user populates page_pre like so,
twentyeleven used as example:
{{{
<?php get_header(); ?>
<div id="primary">
<div id="content" role="main">
}}}
page_post would be like so:
{{{
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>
}}}
As you can see, it is easy for me to make this work with any scenario and
only requires the user to fill in 2 textarea blocks on the plugin admin
page thus making it work with just about any theme.
*may be better ways of doing this, but heck it works and I'm rather new.
Now, to just get WordPress to append/add these files to the active theme.
*that's the part I am requesting as an enhancement, or for concept code*
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19296#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list