Tagged: x
-
AuthorPosts
-
October 28, 2016 at 2:02 pm #1235118
Philip MParticipantHi guys,
I’m trying to hide the featured image on my Blog page, as some of my posts don’t have a featured image so all you see instead is a massive black square.After a lot of digging through here, I have found and tried both of the below, with and without !important, but nether works. Could you help please?
Many thanks,
Philip..blog .entry-featured {
display:none;
}.page.page-id-632 .entry-thumb {
display: none;
}(632 is my Blog page ID)
October 28, 2016 at 2:03 pm #1235119
Philip MParticipantThis reply has been marked as private.October 28, 2016 at 7:47 pm #1235474
JadeModeratorHi Philip,4
Please try this code:
.page.page-id-632 .x-recent-posts-img { padding-bottom: 0 !important; }Hope this helps.
October 29, 2016 at 4:02 am #1235716
Philip MParticipantHi Jade,
thank you, that is perfect, just what I wanted.
Regards,
Philip.PS: I always say “Hi guys”, but that includes gals too! 🙂
October 29, 2016 at 5:17 am #1235743
RadModeratorYou’re so much welcome 🙂
October 30, 2016 at 3:27 pm #1236934
Philip MParticipantHi again,
unfortunately, now that I have added some posts, I had another problem on this same page.
It is only showing the last 4 posts.
I have changed Settings>Reading>Blog pages show at most to 10 but that made no difference.I really can’t see where else to change this, and how, if required, to add pagination for when I have lots of posts.
As before, could you enlighten me please?
Thanks so much.October 30, 2016 at 9:34 pm #1237272
Rue NelModeratorHello There,
By default, recent posts element will display up to 4 items only. If you display more items, you will need two or more recent posts elements stacked each other. You just need to use the offset option so that there will be no duplicate items to display.
Hope this make sense.
October 30, 2016 at 9:38 pm #1237276
RadModeratorHi there,
It will not work. That setting is only applicable for archive pages, eg. the real blog page. Your blog page is just a static page with added recent posts element. And recent posts element is just limited to 4. If you like to utilize that posts count setting, then you have to switch to the standard blog page. You can set that at Admin > Settings > Reading.
Thanks!
November 1, 2016 at 6:16 am #1238999
Philip MParticipantHi Rue Nel,
yes, I did consider that, but it would mean constantly adding more and more elements with larger and larger offsets. I didn’t think it was sustainable, plus the page would be really long eventually.
Thanks.Hi Rad,
I had already tried that, but it then shows the entire posts, including the featured image (which was what I was trying to avoid) regardless of what settings I use in “Full post content on index” and “Excerpt length”.
Thanks.November 1, 2016 at 7:17 am #1239045
ChristianModeratorHey Philip,
Yes, there is no option to disable featured image in Blog out of the box so overriding the featured image function is required. Please add the code below in your child theme’s functions.php
//* Disable Featured Image in Blog Page function x_featured_image( $cropped = '' ) { $stack = x_get_stack(); $fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false; if ( has_post_thumbnail() ) { if ( $cropped == 'cropped' ) { if ( $fullwidth ) { $thumb = get_the_post_thumbnail( NULL, 'entry-cropped-fullwidth', NULL ); } else { $thumb = get_the_post_thumbnail( NULL, 'entry-cropped', NULL ); } } else { if ( $fullwidth ) { $thumb = get_the_post_thumbnail( NULL, 'entry-fullwidth', NULL ); } else { $thumb = get_the_post_thumbnail( NULL, 'entry', NULL ); } } switch ( is_singular() ) { case true: printf( '<div class="entry-thumb">%s</div>', $thumb ); break; case false: break; } } }Thanks.
November 1, 2016 at 1:32 pm #1239553
Philip MParticipantThank you Christian,
that does indeed hide the featured image, but the full post content is still showing for every post. Well, except that is for the very first post, which is obeying the 100 word limit I set in the Customiser. Very strange.
Do you have any idea why this is happening?
Thanks again,
Philip.November 1, 2016 at 2:28 pm #1239664
JadeModeratorHi Philip,
Would you mind providing your admin access so that we can check your current settings?
Thank you!
November 1, 2016 at 3:11 pm #1239717
Philip MParticipantThis reply has been marked as private.November 2, 2016 at 1:09 am #1240313
ChristopherModeratorHi there,
Please check provided credentials.
Thanks.
November 2, 2016 at 6:23 am #1240577
Philip MParticipantThis reply has been marked as private. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1235118 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
