Skip to main content
10 events
when toggle format what by license comment
Dec 27, 2016 at 22:40 vote accept JSum
Dec 22, 2016 at 14:43 answer added JSum timeline score: 0
Dec 22, 2016 at 14:13 comment added JSum using: <?php $blog_title = get_the_title( get_option('page_for_posts', true) ); ?><h1><?php echo $blog_title; ?></h1> made the title work. now just hung up on the acf field for the background image.
Dec 22, 2016 at 14:12 history edited JSum CC BY-SA 3.0
updated with title of blog now working
Dec 22, 2016 at 14:07 comment added JSum I feel like this is close. I updated my question to include the banner.php file with my version of your suggestion. The image needs to be set as the background images (inline styling) of the banner. as I have it above the image is now blank. I removed what you suggested and pasted the banner code directly into the template.
Dec 22, 2016 at 14:05 history edited JSum CC BY-SA 3.0
added banner.php file with suggestion in comment
Dec 22, 2016 at 12:38 comment added Prasad Nevase Remove the loop around banner.php file as well as the banner.php include statement. And simply use <?php echo '<img src="'. get_post_meta( $post_id , 'custom_field_name_for_image', true ) . '" alt="Blog" />'; ?> This will show the image on blog listing page. Let me know how it goes and then we will check for showing the title on that image.
Dec 22, 2016 at 12:25 comment added JSum I would like to have the image and the title I set on the blog page to show on the listing, not the image and title from any of the actual blog posts.
Dec 22, 2016 at 12:23 comment added Prasad Nevase I am bit unclear on what you want to do? On blog listing page do you want to show only one banner from custom field of home page? Or you want blog post listing with each post showing it's own image from the custom field? Also can you please share the code for banner.php file?
Dec 22, 2016 at 12:04 history asked JSum CC BY-SA 3.0