Support » Plugin: Custom Related Posts » How to display posts aligned ?

  • Resolved bazar92

    (@bazar92)


    Hi ,

    I want to display my posts aligned, instead of each one on top of each other
    I took a look at the output.php and I couldnt find on which lines I can add flexboxes
    Does anyone have solutions ?

    thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Brecht

    (@brechtvds)

    Hi there,

    Could you give me a link to a page where you’re using the plugin so I can take a look?

    bazar92

    (@bazar92)

    My page isn’t online yet, but I can give you some sample of my code :

    <?php if (in_category('meme')) : ?>
    
        <h2 style="text-align:center;"> Appartient à l'Egregor :</h2>
    
        <br><br>
        <div class="flex-container">
            <div style="">
                <?php echo do_shortcode('[custom-related-posts]'); ?>
            </div>
        </div>
    
    <?php endif; ?>

    And here is what It displays : https://imgur.com/JHU0mCA

    Plugin Author Brecht

    (@brechtvds)

    You should be able to target the “crp-list-item” CSS class.

    bazar92

    (@bazar92)

    Thanks for your reply, i’m now able too modify the CSS of each post, but do you know which class I should use to align them ?

    EDIT : just found

    .crp-list-item {
    background-color: white;
    border: 1px solid grey;
    width: auto;
    max-width: 160px;
    min-width: 160px;
    border-radius: 10px;
    padding: 8px;
    display: inline-block !important;
    margin-left: 16px !important;
    }

    • This reply was modified 1 year ago by bazar92.

    Thanks you… bazar92

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to display posts aligned ?’ is closed to new replies.