Masonry Excerpt Ignores Text In Shortcode

  • Posted in : Editor
  • riolikesyou
    Participant

    Hello!

    I am setting up my categories archive to show in Masonry format. However, the excerpt for each post seems to ignore the first paragraph of the post, which is surrounded by drop cap shortcode.

    How can I use drop caps for the first paragraph of my posts, and still have that paragraph show as the excerpted text on my post summaries?

    Thank you!

    ahmetsali
    Keymaster

    Hi, i see, remove that drop cap shortcode and use this custom css code to get dropcaps;

    .single-post .entry-content:first-letter {
     	font-size: 42px; line-height: 1.1; font-weight: 800; float: left; padding: 0px 12px 0px 0; margin-bottom: -6px;
    	}
    @media screen and (min-width: 768px) {
    .single-post .entry-content:first-letter {
      font-size: 52px;
    }
    }
    
    riolikesyou
    Participant

    Thanks for your suggestion! I tried that, and as the code denotes it worked nicely for single post pages. I tried to amend the code to work for pages as well, but it will take a bit more experimentation on my part to get it working properly without drop-capping unwanted elements. (For example: quotes, navigation items, etc.)

    For now, I’ll just use p class=”drop-cap” where I need it.

    Thanks again!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register