• Automatically adding YARPP in posts doesn’t work. So I thought about using widgets. Unfortunately the alignment remains vertical. I changed the browser zoom and the layout is not ideal. How do I change the alignment of related posts? Or, how do I fix auto-added related posts not showing correctly?

    https://postimg.cc/gallery/NKcqkTT

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author YARPP

    (@jeffparker)

    Widget may not be adding the YARPP code in the desired spot in the template. Suggest using one of the other methods – such as the YARPP function. Could you give this a go?

    Thread Starter ildomandatore

    (@ildomandatore)

    If you say auto-insert in related posts, it doesn’t work. I had to use widgets and enable for posts.

    Plugin Author YARPP

    (@jeffparker)

    @ildomandatore instead of the widget, can you use the shortcode or function?

    https://wordpress.org/plugins/yet-another-related-posts-plugin/#installation

    Thread Starter ildomandatore

    (@ildomandatore)

    I used YARPP block on Gutenberg for widgets.

    I don’t understand what you mean exactly. After that I can try the solution.

    Plugin Author YARPP

    (@jeffparker)

    Are you able to edit your theme files?

    Thread Starter ildomandatore

    (@ildomandatore)

    Yes, I have increased the size of the images using the theme’s custom CSS.

    Plugin Author YARPP

    (@jeffparker)

    In the appropriate theme file, try adding the following shortcode in the proper place you want YARPP to render:

    <?php echo do_shortcode('[yarpp limit=6]'); ?>
    Plugin Author YARPP

    (@jeffparker)

    With regards to horizontal vs vertical – examine your custom CSS for YARPP in greater detail. Since this is custom, can’t get too deep into it, but the following is my initial reaction:

    1. You have set .yarpp-related>div width: 20%. This automatically will force everything into a vertical layout as it’s not much space. Make this ~100%.
    2. You need display: inline-block instead of your custom display: block
    .yarpp-related>div {
        width: 100% !important;
    }
    
    .yarpp-related .yarpp-thumbnails-horizontal .yarpp-thumbnail {
        display: inline-block !important;
    }

    You already have custom CSS overriding these rules. You’ll need to dig into the best way to structure your code.

    Thread Starter ildomandatore

    (@ildomandatore)

    I added the code with Code Snippet, but I don’t see any changes.

    Plugin Author YARPP

    (@jeffparker)

    I added the code with Code Snippet, but I don’t see any changes.

    You’re adding YARPP to your sidebar. Is this what you intend? If not, you need to place it in the correct spot in your template.

    Sidebar width is also limited. If you keep it in the sidebar, you’ll again get a vertical layout.

    Thread Starter ildomandatore

    (@ildomandatore)

    No, I say I added the code to a random location, but it doesn’t appear. Do you see changes?

    I also added the suggested CSS but it doesn’t work.

    Plugin Author YARPP

    (@jeffparker)

    If you change the position of the code, it should reflect. If it doesn’t you should double check on your end. Make sure you clear all your caches.

    We are not seeing any of your changes actually take effect. CSS still the same. Position still the same.

    Thread Starter ildomandatore

    (@ildomandatore)

    .yarpp-related>div {
        width: 100% !important;
    }
    
    
    .yarpp-related>div {
        display: inline-block !important;
    }
    Thread Starter ildomandatore

    (@ildomandatore)

    Could you remind me how to make changes for certain screen pixels?

    @media
Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘How do I align widgets horizontally?’ is closed to new replies.