BuSo Lightning - The Fastest Wordpress Theme

Discussion in 'Marketplace' started by Ryuzaki, Apr 6, 2015.

  1. DD1

    DD1

    Joined:
    Oct 2, 2017
    Messages:
    15
    Likes:
    11
    Degree:
    0
    Good morning Builders,

    I am currently migrating my main site into BuSo Lightning and before I finalize it, I need help with one important thing: how can I create a full-width post template? BSL currently has a full-width page template but no post.

    I have found the full-width.php file, I kind of feel I could probably get away copying it all, changing a few things, and pasting it somewhere else, but I need the fine details from someone who knows all this.

    I have created a child theme and pasted a few CSS modifications there, just as an aside.

    Thanks in advance, cheers.
     
  2. DarkRed

    DarkRed

    Joined:
    Aug 2, 2017
    Messages:
    34
    Likes:
    20
    Degree:
    0
    Hi,

    Yo need to change this at the top of the template:

    Code:
    /*
     * Template Name: Full Width
     */
    for this:
    Code:
    /*
          Template Name: Full Width
          Template Post Type: post, page, product
          */
     
    DD1 likes this.
  3. DD1

    DD1

    Joined:
    Oct 2, 2017
    Messages:
    15
    Likes:
    11
    Degree:
    0
    Hi DarkRed.

    I just added that line in the full-width.php file and everything is working just fine.

    Thanks a lot!
     
    DarkRed likes this.
  4. Ryuzaki

    •  
    •  
    Ryuzaki 女性以上のお金 Staff Member

    Joined:
    Sep 3, 2014
    Messages:
    2,731
    Likes:
    4,978
    Degree:
    6
    Good catch, Wordpress has changed since I added that template and now allows custom templates for posts. I'll add this to the download file and re-upload.

    UPDATE
    From the packaged readme.txt file:

    = 2.1 =
    • Google font header link now relative to avoid HTTPS mixed content errors.
    • Full width page template now works for posts and products as well.
    • Removed local jQuery, allowing Wordpress to enqueue it and jQuery Migrate.

    Thanks to @DD1 and @DarkRed for finding and providing the solution to allow the full width template to be used for posts, and to @Apex for noticing the hardcoded http:// for Google fonts.

    Note: I added a section to the readme.txt that says:

    The minified CSS and JS files are currently called within the header and footer, respectively. The assumption is that developers will want to expand upon these files, thus I've chosen not to enqueue them within the functions.php. When your site reaches a finalized stage of design and functionality, you may choose to enqueue them there although you won't experience any conflicts if you don't.
    It's a confusing process that's better left undone, since there's only 1 CSS and 1 JS file. But the style.min.css is a combination of 3 CSS files. With all of that taken into account, it's far more self-explanatory to not have them enqueued. Developers will know what to do and non-devs will have a much easier time working with the CSS this way.

    Thanks for all the downloads. I hope you guys are making some money with it. I've got some bigger and better things on the horizon, be on the lookout!
     
    Apex, DD1, Cash Builder and 1 other person like this.
  5. DD1

    DD1

    Joined:
    Oct 2, 2017
    Messages:
    15
    Likes:
    11
    Degree:
    0
    Good morning Builders,

    So I took the plunge and did the full migration anyways. My last issue are the images.

    On my previous layout, I used many 150x150 and 300x300 images with text framed around the image. All those images also have the defined width and height by WP.

    I don't understand why, but in some places the images are stretched to 100% of the page. While I was dealing with 1 element at a time, I was working around that -- I used a wider logo image, I learned how to use Font Awesome instead of image social icons.

    However now I need to edit 19 posts and God-knows-how-many images on each of those. I just tried reinserting one image but it will stay stretched anyways. Is there any way of using non-full-width images on BSL?

    Thanks in advance.
     
  6. Ryuzaki

    •  
    •  
    Ryuzaki 女性以上のお金 Staff Member

    Joined:
    Sep 3, 2014
    Messages:
    2,731
    Likes:
    4,978
    Degree:
    6
    @DD1, I suppose you're talking about images on posts. You have several options, but the best one is to probably go into the functions.php and create a 3rd image size for you to choose when you embed images. Currently there's .size-thumbnail and .size-full. The thumbnail is only used for the category pages and the homepage.

    You could create your own .size-medium, for instance, which is perhaps 250px wide. Then you could define a max-width for that CSS class. That'd look something like this:
    Code:
    .size-medium {
        max-width: 250px;
        width: 100%;
        height: auto;
    }
    What that achieves is it tells the image to always stretch to 100% of the width of the container, but it can't go past 250px;. But by keeping it percentage based, you keep it responsive. And with the height set to auto it will always grow or shrink proportionately.

    You'll likely want to consider how this behaves with the float left and float right options and being centered.

    The above is if you want to keep the option for the full-width images. If you don't, then you can just override the current CSS for .size-full to include a max-width of your choosing, but it will effect all images in posts.

    The idea is that the base is there for you. You can add more image sizes, or you can edit the current existing one. Adding more is probably how you want to go.
     
    DD1 likes this.