Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, I am interested in this too. Using “Inspect Element” in my browser I can see that wp-post-image is set at 100 x 100, but I can’t see where it is set this way. Is it hard coded in somewhere?

    I think I have solved this, for anyone willing to edit the plugin files.

    If you go to the plugin in your dashboard and click on “Edit”, a PHP file will open and there are 10 files in a list to the right. Choose the file “baw-manual-related-posts/inc/frontend-noajax.inc.php” to open it up in the edit window.

    Copy the entire file to a text editor and save it, just to make sure you can restore it if you stuff something up.

    You need to edit two pieces of code, which change the default size of the image and change the width of the “li” which contains each related post.

    1. About halfway down there is a filter for “bawmrp_li_style”, which includes “width=120px”. Change this to 150px, or whatever suits (I used 200px).

    2. A little further down is another filter for “bawmrp_thumb_size”, which sets the default to “100,100”. Change this to the image size you want – 137,84 in your case (I used 150,75).

    Click on the update file button and refresh your page and it should all come out the way you want (though I had to close my site down and open it up again to get the new values to “take”. Then style the elements as required.

    It worked for me, hope it works for you.

    I don’t know if anyone will ever read this, but I have improved the code further (I think).

    As written, the plugin code fixes the width of each related post graphic and link. That means, in a responsive design, with smaller screens, the strip of related post links becomes too long for the width and one of the graphics/links overflows onto the next line, which can be ugly. Normally you would deal with this through media screen code in the CSS, but since the width is hard-coded into the PHP, the CSS won’t over-ride it.

    The solution is simple. Remove the width statement for “bawmrp li” from the plugin PHP (the size for the image can remain) and put it into the CSS. Make it (say) 25% (if you want four graphics/links across the page), and then change it to 50% when the screen size is smaller (making 2 lines across the page).

    My suggestion to the plugin designer. This seems to be a well-written plugin that fulfils my requirements for a manual related posts rather than automatic, but why put the styles for “bawmrp li” into the PHP code at all? Why not take it all out and add an extra file which instructs the user ot add the CSS to their style.css file?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change default image size ?’ is closed to new replies.