Skip to content

Instantly share code, notes, and snippets.

@slambert
Created June 17, 2010 06:16
Show Gist options
  • Save slambert/441749 to your computer and use it in GitHub Desktop.
Save slambert/441749 to your computer and use it in GitHub Desktop.
These 2 files are the same except for line 50 and 51. How could I do this with a filter instead of using the modified page.php in my child theme. It seems inefficient to use so much code to essentially change 2 lines.
<?php
// calling the header.php
get_header();
// action hook for placing content above #container
thematic_abovecontainer();
?>
<div id="container">
<div id="content">
<?php
// calling the widget area 'page-top'
get_sidebar('page-top');
the_post();
?>
<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class() ?>">
<?php
// creating the post header
thematic_postheader();
?>
<div class="entry-content">
<?php
the_content();
wp_link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'thematic'), "</div>\n", 'number');
edit_post_link(__('Edit', 'thematic'),'<span class="edit-link">','</span>')
?>
</div>
</div><!-- .post -->
<?php
// calling the comments template
thematic_comments_template();
// calling the widget area 'page-bottom'
get_sidebar('page-bottom');
?>
</div><!-- #content -->
</div><!-- #container -->
<?php
// action hook for placing content below #container
thematic_belowcontainer();
// calling the standard sidebar
thematic_sidebar();
// calling footer.php
get_footer();
?>
<?php
// calling the header.php
get_header();
// action hook for placing content above #container
thematic_abovecontainer();
?>
<div id="container">
<div id="content">
<?php
// calling the widget area 'page-top'
get_sidebar('page-top');
the_post();
?>
<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class() ?>">
<?php
// creating the post header
thematic_postheader();
?>
<div class="entry-content">
<?php
the_content();
wp_link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'thematic'), "</div>\n", 'number');
edit_post_link(__('Edit', 'thematic'),'<span class="edit-link">','</span>') ?>
</div>
</div><!-- .post -->
<?php
if ( get_post_custom_values('comments') )
thematic_comments_template(); // Add a key/value of "comments" to enable comments on pages!
// calling the widget area 'page-bottom'
get_sidebar('page-bottom');
?>
</div><!-- #content -->
</div><!-- #container -->
<?php
// action hook for placing content below #container
thematic_belowcontainer();
// calling the standard sidebar
thematic_sidebar();
// calling footer.php
get_footer();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment