Created
November 6, 2013 15:25
-
-
Save csknk/7337903 to your computer and use it in GitHub Desktop.
Back to Blog Page Link attached to Thesis 2.1 hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /**Back to Blog page **/ | |
| function add_back_to_blog() { | |
| //get the page id for the page used for blog posts | |
| $index_id = ( int ) get_option( 'page_for_posts', 0 ); | |
| //set a constant with this page's permalink | |
| $blogpage = get_permalink( $index_id ); | |
| //set a constant with this page's title | |
| $blogtitle = get_the_title( $index_id); | |
| // Link to the Blog archive page | |
| ?><a class="small_font" href="<?php echo $blogpage; ?>">« Back to Blog</a><?php | |
| } | |
| add_action('hook_bottom_next_post', 'add_back_to_blog'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment