Site logo

Archived topic

Custom Paragraph Block

5 replies · Started by Jatin on February 6, 2022

Viewing posts 1–6 of 6

Hi Guys,

I need to create a custom paragraph block called also read. I think it should be a paragraph block like p.alsoread where customization can be performed on the .alsoread class. However, I do not know how to create the paragraph with p.alsoread as in the links and screenshots i shared in the private chat.

I have shared links of two different blogs where this kind of paragraph block is being used. So i guess this is very common thing and easy to create. Both of the blogs which i shared are also using generatepress.

Any help will be appreciated.

Hi there,

Add a Text Block, and in Advanced > Additional CSS Class(es) add: alsoread
Then add the CSS - eg. from the first site:

.alsoread {
    font-weight: 900;
    border: 1px solid #dcdee3;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,.1);
    color: #16a085;
    padding: 15px;
    background: linear-gradient(to right,#eee,#eee);
    border-left: 3px solid #b11f24;
    font-size: 20px;
} 

Or just create it with GenerateBlocks.

Hi David,

Whats a text block. Are you referring to paragraph block ? I did try to add a paragraph block earlier and added this custom css myself but its just a somple <p> tag which does not have any association with .alsoread class. So .alsoread class custom css does not affect when added to the Additional CSS.

Yes Text Block = Paragarph Block.

You just need to follow this:

Add a Text Block, and in Advanced > Additional CSS Class(es) add: alsoread

Great thanks for the help. Its resolved now.

Glad to hear that

This archived topic is closed to new replies.