Responsive image and exclude category or post ?

Post Reply
Doudom
Jr. Bludit
Posts: 3
Joined: Thu May 23, 2019 12:34 pm

Hello,

To begin, congratulations to the Bludit team for this fantastic CMS.
I discovered it a month ago and I was satifait.

However, I have 2 questions:
I have the latest BLudit and the G3nshop plugins.
On my product page, my cover image is responsive but the images inserted in the body are not.
The cover image at the class "featured-image img-fluid"
If I add it by hand on my article images it works. Okay.
Now, how can I make them automatically responsive without doing it by hand every time.
I think this is happening on the PHP product page but I do not know how, or and what to put as code.

And, last question, how to exclude an article category or post from the Home page?

Can you help me ? Thank you

PS: Sorry for my bad English, I'm a French jerk :D and a bad (beginner) programmer! :cry:
MigLacha
Ssr. Bludit
Posts: 14
Joined: Fri Jan 12, 2018 2:00 am
Been thanked: 3 times

Hello, Doudom.

My name is Miguel, and I am the developer of G3Nshop.

For the images in the text body you must create a css style and include it in the file

bl-themes / G3Nshop_theme / css / G3Nshop.css

It would be something similar to:

Code: Select all

div.article-post img {
	width: 100%;
	height: auto;
}
"how to exclude an article category or post from the Home page?"

The sentence to show the categories in the home can be found in line 88 of the file:
bl-themes/G3Nshop_theme/php/home.php

Code: Select all

<?php
    $items = getCategories();

    foreach ($items as $category) {
    
?>	

To personalize the statement you can consult the official Bludit documentation:
https://docs.bludit.com/en/dev-snippets/categories

If you need a customized customization, and you prefer us to do it, you can request a quote at the following address:
https://g3n.es/contacto

A greeting :-)
Doudom
Jr. Bludit
Posts: 3
Joined: Thu May 23, 2019 12:34 pm

Hello Miguel,

Thank you very much for your answer.
I take the opportunity to congratulate you for your plugins.
Installation and setup are rather simple and fast!

Perfect for CSS code. (I had not thought about it, grrr) All my detail pictures are now responsive! Thanks again.

For the exclusion of category, however, I have a little trouble understanding how it works.
I have 2 categories: Boutique and Actuality.
I don't want to see the category Actuality appear on my home page. I don't know how yet.
An idea of the code?

Anyway thank you very much ! (and excuse me for the late response).
Doudom
Jr. Bludit
Posts: 3
Joined: Thu May 23, 2019 12:34 pm

Sorry to come back to the charge,

I really searched and tried several codes but it does not work. (I'm bad!)
To exclude my category "Actuality", I think about something like :

Code: Select all

<?php if $category->name(); = "Actuality" (false) ?>
or something like that.

I am still bad at PHP but I try to learn and understand. :(
This is really the last step for my site to work as I wish this category story.
Someone to bring me caring help or provide me with more element ?
You would help a (nice) idiot find the light ! :idea:
Post Reply