Tagged: blog post, social share
-
AuthorPosts
-
July 28, 2015 at 8:08 pm #479892
How can I customize the default individual blog post template?
Without using the Advanced Layout Builder where do I need to edit the code to make the default blog posts display the social share buttons at the top of the page, as well as on the bottom.
Also how can I edit the default text for date and author to be in this format: “by Author Name on April 5, 2015”Thank you!
July 30, 2015 at 6:45 pm #480837Hi bluelotus!
Try adding this on line 38 in the /enfold/includes/loop-index.php file.
avia_social_share_links();
And for the post meta in the same file on lines 147 – 148 you should see this.
echo "<time class='date-container minor-meta updated' $markup>".get_the_time(get_option('date_format'))."</time>"; echo "<span class='text-sep text-sep-date'>/</span>";
Try moving it down to line 193.
Best regards,
ElliottJuly 30, 2015 at 10:41 pm #480986Thank you Elliott.
I have edited loop-index.php as per your suggestion. However it’s not a viable solution.
The date and time now appear as July 8, 2015/by Author NameJuly 8, 2015/
And the social buttons are above the featured image and are also appearing on the blog page.July 31, 2015 at 2:58 pm #481354Hi!
Try moving it to line 143 in the loop-index.php file.
echo '<header class="entry-content-header">'; if ( is_single() ) { avia_social_share_links(); } echo $title;
Let us know when your done, it will probably need some CSS work also.
Regards,
ElliottAugust 3, 2015 at 5:15 am #481856That helped a lot. Thanks!
For the curious the full solution which worked for this instance is:
Edit loop-index.php and add if ( is_single() ) { avia_social_share_links(); } between the span and the header close tag:echo '</span>'; if ( is_single() ) { avia_social_share_links(); } echo '</header>';
Also change to the following code in loop-index.php
echo '</span>'; echo "<span class='text-sep text-sep-date'>on</span>"; echo "<time class='date-container minor-meta updated' $markup>".get_the_time(get_option('date_format'))."</time>"; echo '</span>';
In style.css add
/* INDIVIDUAL BLOG POST TEMPLATE STYLING ================================================== */ .entry-content p { font-family: Georgia,Cambria,"Times New Roman",Times,serif; font-size: 1.125rem; line-height: 1.6; padding: auto 15px !important; } .entry-content p a { font-family: Georgia,Cambria,"Times New Roman",Times,serif; } div.entry-content { padding: 15px 15px 5px 15px; } .post-meta-infos { top: 0; } .post-meta-infos, .vcard.author span.fn a { font-size: 1em; } .post-meta-infos .text-sep, .post-meta-infos .date-container { color: #7e7e7e; } header.entry-content-header { padding: 15px 15px 5px 15px; } .single .entry-content-header .av-share-box { margin: .5em 0 2.5em; } .av-share-box ul li a { font-size: 2.3em; }
August 4, 2015 at 5:08 am #482487 -
AuthorPosts
- You must be logged in to reply to this topic.