Featured Content Excerpt Box Question

  • Author
    Posts
  • #149513

    fisheref
    Member

    Hi there!

    So from reading other posts, I see that the featured content slider appears not based on the size of the image, but based on the amount of excerpt text. I am trying to feature a page without a title, but it appears I will need a title in order for the featured content slider to be cohesive in size. If I title the page so that the excerpt box is sized correctly for the image, is it possible to suppress the title from showing up on the page itself?

    In other words, can I show the title in the excerpt box, but not on the page itself?

    If not, is there a way for me to change the excerpt text size so that the featured image shows up as the correct size?

    Hope that makes sense, I am very new to wordpress and even less experienced with custom css.

    The blog I need help with is greenenergyohio.org.

    #149518

    tarasdashkevych
    Theme Author

    Hi,

    “… I see that the featured content slider appears not based on the size of the image, but based on the amount of excerpt text. …”
    – The Featured Image is used as background image in this section. So, its size is based on the size of the Featured Content section.

    The height of the Featured Content section is based on the amount of content (page title + page content + read more button) added to the section. The width of the Featured Content section is based on the screen.

    You can set a fixed height for your featured items using this custom CSS:

    
    #featured-content .featured-slide {
      height: 400px;
    }
    

    It might cause overflow issues in smaller screens if the height is limited.

    “In other words, can I show the title in the excerpt box, but not on the page itself?”
    – It’s only possible with a custom CSS because WordPress does not provide an option to hide page titles in single views at the moment.

    Here is an example of hiding the page title for this specific page: https://greenenergyohio.org/givingtuesday/

    
    .page-id-12847 .site-main .entry-title {
    	clip: rect(1px, 1px, 1px, 1px);
    	clip-path: inset(50%);
    	height: 1px;
    	width: 1px;
    	margin: -1px;
    	overflow: hidden;
    	position: absolute;
    }
    

    Where 12847 is ID of the parent page (https://en.support.wordpress.com/pages/#how-to-find-the-page-id).

    Please let me know if you have any additional questions.

    Thank you,
    Taras

    #150276

    fisheref
    Member

    Hi Taras,

    Is this possible to do this for posts as well?
    I tried modifying the css you wrote (below) and it didn’t work.

    .post-id-13107 .site-main .entry-title {
    clip: rect(1px,1px,1px,1px);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    }

    #150291

    tarasdashkevych
    Theme Author

    Hi,

    WordPress uses a little bit different syntax for single posts. So, your custom CSS should look like this:

    
    .postid-13107 .site-main .entry-title {
      clip: rect(1px,1px,1px,1px);
      height: 1px;
      width: 1px;
      margin: -1px;
      overflow: hidden;
      position: absolute;
    }
    

    Let me know if you have any additional questions.

    Thanks,
    Taras

The topic ‘Featured Content Excerpt Box Question’ is closed to new replies.