Community Forums › Forums › Archived Forums › Design Tips and Tricks › Genesis Sample child theme blog featured image with ads below.
Tagged: featured image, post_modified_date, single post
- This topic has 9 replies, 2 voices, and was last updated 6 years, 11 months ago by ictiempo.
-
AuthorPosts
-
May 18, 2017 at 8:53 pm #206667ictiempoMember
Hello, I just purchase the Genesis Framework with sample child theme.My previous theme was customized to display Featured image on top, just below the post info and after the featured image there is a 728X90 ad.
The post info was also replaced. Instead of date posted it was changed to post updated date. How can I bring those customization on Genesis child them? Your reply will be highly appreciated.
https://www.techchore.comMay 19, 2017 at 12:51 am #206670Brad DaltonParticipant1. You can add the featured image to single posts in genesis using code. You'll find the code in several themes functions files.
2. You can search for a tutorial which shows you how to modify the post date to updated date. This requires the changing of the post info shortcode.
May 19, 2017 at 6:46 am #206687ictiempoMemberThank you for your Reply Braddalto. I found it useful and I will be trying it. However, how can I add my 728x90 ads just below the featured image on every post?
May 19, 2017 at 6:50 am #206689Brad DaltonParticipantBrad Dalton
Add your code just before the final closing curly bracket
echo 'Your Advert'; }
May 19, 2017 at 7:00 am #206691ictiempoMemberThank you for prompt reply, I am sorry but I only knew few HTML and CSS and completely helpless on Php. What php files I will be opening, Single.php? You wrote "echo 'Your Advert'; }. As what I understood I will be replacing the "Your advert" with my ad code?
May 19, 2017 at 7:19 am #206694Brad DaltonParticipantUse the same code which adds the featured image which i linked to above.
May 19, 2017 at 7:24 am #206695ictiempoMemberHello,
So, I will be opening Function.php paste the code `add_action( 'genesis_entry_header', 'single_post_featured_image', 15 );
function single_post_featured_image() {
if ( ! is_singular( 'post' ) )
return;$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );}` Then after the ad code?
May 19, 2017 at 7:38 am #206696Brad DaltonParticipantMay 19, 2017 at 6:07 pm #206716ictiempoMemberHello, I would appreciate if you will guide me, what php to open and where exactly the ad code to be place. As what I understood that function.php is the only php file to open. Then, I will input the featured image code. What confuses me is this:
Add your code just before the final closing curly bracket
echo 'Your Advert';
}You said that before the curly bracket but before the semicolon there is a 'your advert'? What curly bracket that you mean? That's why in this thread https://www.studiopress.community/topic/genesis-sample-child-theme-blog-featured-image-with-ads-below/#post-206695 I asked if the curly that you mean is after the featured image code? If not, how do i suppose to input my adcode. I hope you will answer me on layman's perspective.
May 21, 2017 at 6:57 am #206783ictiempoMemberHello Braddalto,
Thanks for providing the help. I was able to configure on how to add ads below featured image by using advance ads plug-in.
May I ask,by changing the post date to update date, will search engine read and display that on search results? Because, after changing to Genesis theme yesterday google search read the post date instead of date the post was modified.
Thanks in advance.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.