-
AuthorPosts
-
April 20, 2015 at 1:04 pm #254159
I want to format the recent posts layout to display a thumbnail or icon on the left side while the title, excerpt, etc is on the right side. Which file do I edit for this?
I looked at http://theme.co/x/demo/integrity/1/shortcodes/recent-posts/ but it’s not what I was looking for.
April 20, 2015 at 4:34 pm #254273Hello There,
Thanks for posting in!
To format the recent posts layout to display a thumbnail or icon on the left side while the title, etc is on the right side, please add the following css code in the customizer, Appearance > Customize > Custom > CSS
.x-recent-posts .x-recent-posts-img { float: left; width: 30%; } .x-recent-posts .x-recent-posts-content { float: left; width: 68%; margin-left: 2%; } .x-recent-posts a { padding: 5px; } .x-recent-posts.horizontal .with-image .x-recent-posts-content { padding-top: 0; } .x-recent-posts.vertical a { box-shadow: none; border-radius: 0; padding-bottom: 6%; border: none; border-bottom: solid 2px #e5e5e5; } .x-recent-posts.vertical a:last-child { border: none; } .x-recent-posts article.hentry>.entry-wrap:after { content: " "; display: block; clear: both; height: 0; }
To add the excerpt in your recent post shortcode, please refer to this post: https://theme.co/x/member/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66964
Hope this helps. Kindly let us know.
April 20, 2015 at 7:11 pm #254361I added the excerpt but it’s not working. Do it has something to do with adding the recent posts to the text area in widget? Also what is the green circle in the img? I added a image to .x-recent-posts .x-recent-posts-img {
float: left;
width: 30%;
}
And it’s showing a green circle with an document icon inside. How do I fix it?April 21, 2015 at 1:04 am #254549Hi,
To further assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
Thanks
April 21, 2015 at 4:45 pm #255257This reply has been marked as private.April 21, 2015 at 4:56 pm #255260Never mind about the excerpt. I figured out the problem with excerpt. But I still couldn’t figure out how to fix the thumbnail.
April 21, 2015 at 11:12 pm #255426Please add the code below in your Appearance > Customize > Custom > CSS.
.x-recent-posts .format-standard .x-recent-posts-img:before { display: none; } .x-recent-posts .x-recent-posts-content { padding: 0 0.75em 0.775em; }
I’ve added the recent post content padding code to eliminate the space above the recent post title so it’ll look good.
Thanks.
April 22, 2015 at 2:16 pm #256029Thanks! I tried to edit the excerpt length so as to limit the amount of excerpt show with the link “Read More” to show, but nothing is working. I edit the excerpt length in the blog section in customizer. How do I fix it?
April 22, 2015 at 6:55 pm #256199Hello There,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Meanwhile, you can check the thread on this post:https://theme.co/x/member/forums/topic/blog-excerpt-formatting/
Hope this helps.
ThanksApril 22, 2015 at 8:40 pm #256270This reply has been marked as private.April 22, 2015 at 11:41 pm #256369Hi Shark,
Could you try adding this code at your child theme’s functions.php with your own excerpt length.
function custom_excerpt_length( $length ) { return 20; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
Thanks!
April 23, 2015 at 10:31 am #256723Okay the excerpt with read more works now. But I wanted the read more link to be orange, but the rest of the text to be just gray. How do I fix it. I read the answer from https://theme.co/x/member/forums/topic/modifying-the-read-more-link/ but I wasn’t sure if it’s correct for what I’m looking for….
April 23, 2015 at 2:37 pm #256891Hello Shark,
Thanks for writing in.
Kindly go-ahead with the link you shared. Please let us know how it goes.
Thanks.
April 23, 2015 at 3:25 pm #256928I added the code to function.php and it’s not working. Can we edit this line: . ( $enable_excerpt ? ‘<span class=”x-recent-posts-excerpt”>’ . strip_tags( get_the_excerpt() ) . ‘</span>’ : ” ) to include
. get_permalink( get_the_ID() ) . ‘”>’ . __(‘Read More’, ‘your-text-domain’) ?Or edit the code from that link I shared to this:
function new_excerpt_more( $more ) {
return ‘ ‘ . __(‘Read More’, ‘your-text-domain’) . ‘‘;
}
add_filter( ‘excerpt_more’, ‘new_excerpt_more’ );April 23, 2015 at 3:28 pm #256929function new_excerpt_more( $more ) { return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">' . __('Read More', 'your-text-domain') . '</a>'; } add_filter( 'excerpt_more', 'new_excerpt_more' );
-
AuthorPosts