• Resolved mseb

    (@mseb)


    Hi all,

    I have a problem as I want to center the related posts in the widget. I checked multiple options from the forum here but none worked ??

    Does anyone maybe found a solution to add some css or could help me checking what the issue could be?

    I use the ashe pro theme.

    Best regards
    Mirek

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi Mirek,

    I have checked the related posts widget area on your website and it looks like you are using the “rpt_content_align” filter. But it seems a little issue in your code.

    Please replace your filter code with the following snippet:

    function relpost_align_cb( $align ) {
      $align = ' relpost-align-center';
      return $align;
    }
    add_filter(  'rpt_content_align',  'relpost_align_cb' );
    

    Let me know if this resolves the issue.

    Cheers!

    Thread Starter mseb

    (@mseb)

    Hi Asad,

    Well, it went into the right direction, but created a new issue ??

    Now it is centred but the images are not in line anymore on most pages. I believe before they were all starting on the top for the vertical direction and now they are also centred… Any idea what to do with that?

    Do you know what I mean or should I create a screenshot?

    Brgds
    Mirek

    I am not able to locate related posts section on your site anymore.

    Can you turn related posts widget on so I can sort the issue for you? Also, do share with me the URL on which related posts is located.

    Looking forward!

    Thread Starter mseb

    (@mseb)

    Hi Asad

    it’s activated on every post on the right widget sidebar, just not on the start page. If you click on any post in the slider you should be able to see it again.

    Thanks
    Mirek

    Hey Mirek,

    I have checked the posts, they don’t seem to be vertically aligned in middle.

    The related posts are the same as before but only horizontally aligned in the center, you can check by removing the filter and see the difference.

    Thread Starter mseb

    (@mseb)

    Hi Asad

    I deactivated the filter again and this is how it looks:

    https://www.dropbox.com/s/ur6wo750nr34txj/Photo%2014.01.20%2C%2010%2025%2012.jpg?dl=0

    All pictures are aligned to the top as it should be but the whole widget is not centred.

    When I activate again, it looks like this, quite random alignment to the top but centred widget:

    https://www.dropbox.com/s/0pfr4un1sphsl8h/Photo%2014.01.20%2C%2010%2026%2001.jpg?dl=0

    Any idea why?

    I see.

    I have visited several pages on your site and the images in related posts widget seem to be aligned at the top as here: https://nimb.ws/dFc9f8

    Please share the URL to page where the images layout is broken so I can fix it.

    Cheers!

    Thread Starter mseb

    (@mseb)

    Actually the same post looks different when I visit:

    Hipster in Wroclaw

    Maybe it’s important to mention I use iPad Pro? In the mobile view on iPhone it’s the same problem.

    Yes, now I see the issue is with Safari browser. You can use the following CSS snippet and it will surely resolve your issue.

    
    .relpost-block-container .relpost-block-single {
    	vertical-align: top !important;
    }
    
    Thread Starter mseb

    (@mseb)

    Amazing, that works! Thanks for your patience and the great and quick support!

    I am glad everything works for you now, always happy to help ??

    Cheers! ?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Related posts should be centred in widget’ is closed to new replies.