Forum Replies Created
-
AuthorPosts
-
greetMember
This post gives my solution: http://www.studiopress.community/topic/add-content-to-first-page-of-genesis-blog-page-template/
greetMemberI worked something out(inspired by Brad Dalton's code above) that does what I was looking for. Since I'm just a beginner it might not be the best solution ...I added a page "blog_page.php" to my themes folder with the following code:
<?php
/**
*
* Template Name: Blog
* This file handles blog post listings within a page.
*
*///START add page-content to first page of blogpage
function add_content_blog_page() {
global $paged;
if( $paged < 1 ) {
$page_id = $page->ID;
$page_data = get_page( $page_id );
if($page_data->post_content != ""){
echo '<div class="content-box-blue">';
echo apply_filters('the_content', $page_data->post_content);
echo '</div>';
}
}
};add_action ('genesis_before_loop', 'add_content_blog_page', 5 );
//END add page-content to first page of blogpage
genesis();
April 17, 2013 at 1:42 am in reply to: Add content to first page of genesis blog page template #35905greetMemberThis would be a nice solution for the archive pages since I use genesis, but the pages where I would like to add content to the top of the first page is a 'blog' page and not an archive page.
April 17, 2013 at 1:08 am in reply to: Add content to first page of genesis blog page template #35901greetMemberBut then the text is not editable ...
What is the name of the plugin? I have been searching without any luck ...Thanks, Greet
April 16, 2013 at 2:27 pm in reply to: Add content to first page of genesis blog page template #35819greetMemberIn the tutorial the folowing code puts the page content to the top of the blog-page:
add_action('genesis_loop', 'genesis_standard_loop', 8);
How can I extend this to only include this content on the first page and not on subsequent pages.
The link to this page on my site = http://preview.pain-ed.com/public/patient-stories/
Thanks, Greet
greetMemberGreat! Thanks a lot. I will dive into it 😉
-
AuthorPosts