Search code examples
wordpressshortcodevisual-composer

Issue with using [display-posts] shortcode with Visual Composer


I'm trying to add a list of recent posts in-line to WordPress pages using Visual Composer using the [display-posts] shortcode. However, whenever I do so, the title and link of the posts are displayed one column to the left of where they should be - the column I specify [display-posts] in just has either the date of the post (if requested with include_date="true"), or a blank bullet point (if not requested).

Does anyone know what I'm doing wrong here. I attach some screenshots as examples.

Visual Composer set up - the list of posts should be in the right column...

Visual Composer set up - the list of posts should be in the right column...

Result on page - the lins and post titles seem to have spilled over to the left column...

Result on page - the lins and post titles seem to have spilled over to the left column

Thank you for your help


Solution

  • Add this style in style.css actually .title class getting style from theme which conflicting with current structure with below code you can remove that.

    .my-display-posts-format .listing-item .title{
        position:static;
        left:0;
    }
    

    It will surely work.