WordPress.org

Ready to get started?Download WordPress

Forums

Single Latest Posts Lite
[resolved] - Post Title format (10 posts)

  1. robinharry
    Member
    Posted 1 year ago #

    I was wanting to change the font, font size and colour of the post headings that are displayed by the plugin via shortcode - how can I change this?

    Thanks

    Robin

    http://wordpress.org/extend/plugins/single-latest-posts-lite/

  2. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    You could use CSS, here is one I created so you can easily adapt it to your needs: SLPosts Custom Titles

    At the end of the file you will see the section below, just change the rules to adapt titles to your theme:

    /*\
     * ---------------------
     * | + Custom Titles + |
     * ---------------------
    \*/
    .slposts-wrapper .slposts-ulist-title a,
    .slposts-wrapper .slposts-olist-title a,
    .slposts-wrapper .slposts-block-title a {
    	font-family: Helvetica;
    	font-size: 3em !important; /* Keep the !important */
    	color: red;
    }
    .slposts-wrapper .slposts-ulist-title a:hover,
    .slposts-wrapper .slposts-olist-title a:hover,
    .slposts-wrapper .slposts-block-title a:hover {
      color: blue;
    }
    /*\
     * ---------------------
     * | - Custom Titles - |
     * ---------------------
    \*/

    Save the file 'slposts-customtitles.css' to your active WordPress theme root folder (where the style.css file is found) then add the css_style parameter to your shortcode, something like this:

    [slposts css_style=slposts-customtitles]

    Hope it helps.

    Best regards,
    José Luis.

  3. robinharry
    Member
    Posted 1 year ago #

    José Luis

    Thanks for this and your fast response - it works great.

    I'm also hitting the problem with the thumbnails that I know you've answered before where I'd like to show images that are 400x150 using your plugin but need to keep the thumbnail size for other pages to be 150x150 - I assume you've not found a way around this yet?

    Thanks again

    Robin

  4. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Robin,

    I'm glad to know it works, as for the thumbnails shamefully this is something I can't fix on my own, once we upload images WordPress fixes their sizes, this plugin uses those images which have been resized already, it also uses core functions to handle them so it's not possible to resize them beyond their original size (which is 150x150 by default).

    I could of course hardcode image dimensions but it will bring as a result pixelated images with a poor visual quality, that's why I recommend people other solutions. Here is an idea: Change default WordPress thumbnail dimensions, resize thumbnails using one of the plugins proposed in other topics, if you see your theme is displaying thumbnails applying the new dimensions, then use CSS to fix their size using their classes, i.e:

    .supertheme-thumbnail {
        width: 150px !important;
        height: 150px !important;
    }

    It's not a panacea, but it may help. There are solutions proposed like this one: Setting Post Thumbnail on WordPress with custom size and Cropping – A simpler approach but it has the same constraints, once WordPress has set its default dimensions, even add_image_size won't let you create a copy beyond the size set by default.

    Cheers.

  5. Bevan78
    Member
    Posted 11 months ago #

    Great plug-in and great support above!

    I was wondering if you could have 3 posts running horizontally across the page rather than having them listed below each other?

    http://www.bevancockerill.com

    Regards
    Bevan

    http://wordpress.org/extend/plugins/single-latest-posts-lite/

  6. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 11 months ago #

    Hello Bevan,

    You could create a custom CSS stylesheet to do that, I've tweaked the default style to display blocks horizontally. Of course you may want to add some more changes to adapt it to your theme.

    Download this CSS file and save it to your active WordPress theme folder: slp-horizontalBlocks.css then set your Widget Style Settings > Display Type to Blocks, and Custom CSS filename to slp-horizontalBlocks

    The only changes I made to the default stylesheet were these:

    @media( min-width: 800px ) {
      .slposts-block-item {
          float: left; // Float items to the left
          width: 33.33%; // Set them 33.33% width so 3 blocks fit horizontally
          margin-right: 10px;
          margin-bottom: 10px;
      }
    }
    .slposts-block-thumbnail a > img {
        border: 1px solid #efefef;
        padding: 3px;
        margin: 0 0 1em 0;
    }

    Which you will find below comment block starting at line 409:

    /*\
     * =========================
     * |                       |
     * | ++ Blocks ++          |
     * |                       |
     * =========================
    \*/

    Hope this helps,

    Cheers.

  7. Bevan78
    Member
    Posted 11 months ago #

    Wow, super fast response. Great support service!

    I have followed your instructions and was able to select Blocks. I then inserted slp-horizontalBlocks into the custom CSS filename box but the posts are still showing below each other rather than across.

    Do you have any suggestions?

  8. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 11 months ago #

    Hello Bevan,

    Sorry I forgot to modify blocks when using Widgets, I've fixed it now. I've also reduced width to 31.33% to fit 3 blocks in the area you've set the widget. Please replace the CSS file by this one: slp-horizontalBlocks.css. Here is a screenshot where you can see how it should look like: http://i.imgur.com/ADlXfbS.png (taken directly from your website, applying fixed rules).

    Please let me know if it works.

  9. Bevan78
    Member
    Posted 11 months ago #

    That's brilliant, so helpful and issues resolved!

    Great Author!!!!!

    My next issue is the thumbnail sizes but understand that's driven by WordPress not the plugin. Thank you so much for your help!

    Bevan

  10. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 11 months ago #

    I'm glad it's working now. As for the thumbnails just set the widget Height and Width, however, bear in mind those dimensions are ruled by WordPress thumbnail sizes, they crop images do not resize them so if you want your thumbnails to be set 300x100px then your WordPress thumbnail size must be at least 350x350px.

    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic