Hello, I am hoping to allow my Home Page to show static text above the blog excerpts as an introduction to the blog. In the “Settings -> Reading” area I have set my “front page” to be “static,” and I designated a particular page. In the “Edit Page” area of that particular page I have set it to “Blog” rather than “Default Template.” Ideally, I would like the same text/code that appears in that particular page’s “Edit Page” section to appear above the blog post excerpts, but at this point I will settle for any method to add static text/code above the excerpts. I found the following code for a different theme, and attempted to add it to my child theme’s functions.php file, but it didn’t work:
// Add content of page called "blog" to the page that contains the list of blog posts
add_action ( '__before_loop', 'add_blog_page_content_before_post_list');
function add_blog_page_content_before_post_list() {
if ( is_home() ) {
$post = get_page_by_path( '/blog' );
echo wpautop($post->post_content);
}
}
Any help is greatly appreciated. Thanks for a great theme and for always having great support!
[btw my site is not live. I can email admin credentials if necessary]