WP Product Page Help needed - php

I'm trying to make this product page and have the items all in there but the problem is the pictures for each item are different size. I tried using Hard Crop but it didn't work.
I want the best solution for this that takes up the least amount of time and is the easiest.
http://burnabycitycomputers.com/shop

Change the style to the woocommerce.css file in line no.48
.woocommerce .page-wrapper img {
height: 150px;
width: 100%;
}
Add this style to your style.css file
.woocommerce .t-entry-visual {
height: 150px;
width: 100%;
}
If no tricks worked out put an !important over to your css and this should make a trick for you. I have not used important if needed you pursue that.

Related

Image is not shown over the entire screen despite css code

On my website, I want to cover a page (not the home page) completely with a picture. It should completely fill the screen on every device. I have specially created a childtheme to handle this problem.
On my website, I want to create a gallery facility that greets the visitor with a picture across the entire screen. I've created a childtheme for it as already mentioned. I first tried once in the functions.php folder to set the content width to 100%. Unfortunately, this did not work. Then I tried it with all over the custom css field on my wordpress theme. That too did not work.
`element.style {
background-image: url(https://philippfalkenhagen.de/wp-content/uploads/2019/10/Reh-im-Mohnfeld-Startseite-1.jpg);
max-width: 100%;
height: 801px;
width: 100%;
}
With this code, it should actually be funkitoinieren as I want. Unfortunately I can not integrate it into my data. He does not fit in functions.php and he does not work as a custom css either.
// set default content width
if ( ! isset( $content_width ) ) {
$content_width = 680;
}
This code in the functions.php folder was my second attempt. I could not set the width to 100% and on all other values ​​she looked the same.
I expect that the picture under philippfalkenhagen.de/tiere-2`fills the entire screen. unfortunately it is not like that. When I used 100% of the second code, I could not even access my website until I reset the code.
Since you are dealing with a background and not a figure itself, try to use background-size: 100% 100% and background-repeat: no-repeat.
`element.style {
background-image: url(https://philippfalkenhagen.de/wp-content/uploads/2019/10/Reh-im-Mohnfeld-Startseite-1.jpg);
max-width: 100%;
height: 801px;
width: 100%;
background-repeat: no-repeat;
background-size: 100% 100%;
}
background-size: cover;
will help you to solve this issue.
updated:
`element.style {
background-image: url(https://philippfalkenhagen.de/wp-content/uploads/2019/10/Reh-im-Mohnfeld-Startseite-1.jpg);
max-width: 100%;
height: 801px;
width: 100%;
background-size: cover;
}
This is my functions.php folder:
https://we.tl /t-g7Mvc2EbC6
I suspect that I have to put the code here, but I do not know where.

SET woocommerce defaut css BACK

EDIT:
I change the css and the rows are there. But now, Ths columns are not with the same size. Anybody can help me?
.products { /*****styling products*****/
display: flex;
flex-wrap: wrap;
padding-left: 0;
margin-bottom: 0;
list-style: none;
margin-right: 0.5rem;
}
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
flex-grow: 1;
flex-basis: 20%;
display: flex;
}
I'm working hard to make my own woocommerce theme, but somehow, I did something that broke the default css and besides everything, I have now a big problem with my shop page, the products are shown in list (as expected), but I only can handle the number of products displayed per page, I can't choose the number by row or column, I couldn't show rows, just one.
I have decided to start over, but my last host is this: Anybody knows a way to bring the default css back? It could save me tons of work.
If I use another theme, everything works.
My shop: www.quickgamestore.ml
How did you install your woocommerce? If you uploaded it yourself, you can easliy extract the CSS File you need.
Otherwise, try to get the Template you are using and extract the CSS File there.

Move Specific Elements

I'm currently building a site using WordPress. I'm trying to layout a listview for the products page with CSS but I am experiencing a couple of problems. The code behind these elements are within the WordPress files so I'd rather not touch those if possible.
What I'm trying to do is move "MSDS" next to the title as it was below the title before. I've set it to relative position and moved it using top and right pixel values.
Example 1
Example 2
My first problem is that if you look at Example 1. I have positioned "MSDS" next to that specific title but when you look at Example 2, it has a shorter product name but the positioning of "MSDS" is the same therefore it looks silly. How do I go about fixing this?
My second problem may be fixed if the first is fixed but on a maximised window, the layout looks fine but when resized to a smaller window then the window covers "MSDS" but the title looks fine as it wraps so it's viewable on the page.
I'm not entirely sure where to look or what specific things I should be looking for to find a fix for this. So any help would be much appreciated. The code below is what I used to reposition the "MSDS"
.product-list .product-thumb .description {
position: relative;
bottom: 26px;
left: 290px;
width: 30px;
}
You can always use :after for these things
These should help.
Add these in your stylesheet to
.product-list .product-thumb .description:after {
position: absolute;
content: "MSDS";
color: blue;
}
You can style the element accordingly then
you are looking for position: relative and position: absolute i think.
Try this: https://jsfiddle.net/r5rnyh3y/1/
.title {
display: inline-block;
position: relative;
}
.title a {
position:absolute;
right: -100%;
margin-right: -10px;
display: inline-block;
width: 100%;
}

Automatic Centering Of Gallery

Everytime I add a Gallery in a post, I need to modify the html from
[gallery type="rectangular" link="none" ids="1743,1742,1741"]
to
<div style="margin: 0 auto; width: 500px;">
[gallery type="rectangular" link="none" ids="1743,1742,1741"]
</div>
I want to modify the php file to have this extra html added. Is this possible to do? I have limited knowledge on php and am struggling to find where this gallery tag is generated.
The gallery gets generated in a <div> with class="gallery" and some variable classes, depending on the gallery settings. See wp-includes/media.php#L1046.
So, you can simply add the following style in your stylesheet (styles.css), or using a plugin like Simple Custom CSS.
.gallery {
margin: 0 auto;
width: 500px;
}
If your theme is responsive, I would suggest to also set the maximum width to 100% to make sure it fits smaller screens as well.
.gallery {
margin: 0 auto;
width: 500px;
max-width: 100%;
}
Do note that since you specifically add "rectangular" as type, you might want to use a different class than gallery to make sure the styles do not get applied to other galleries.
To verify which class can be used, you can inspect the gallery in your browser:
Hover over the gallery,
click on right mouse button and select 'inspect element'.
I hope that helps. GL!

How to create picture grid without spacing/padding? (WordPress)

I am working on a WordPress site and there is something that I just can't figure out no matter how hard I try. I want to have a grid similar to this (http://www.elegantthemes.com/gallery/origin/) but more like this: (http://themeforest.net/item/hercules-portfolio-business-wordpress-theme/full_screen_preview/5124743). You'll see that in the hercules theme the grid is only at the top of the page. I want to do something similar to that at the middle of the page. Unfortunately I cannot switch themes to get that one function. So I wanted to know how I would create my own version. Can someone point me in the right direction?
P.s. the grid does not need to have any fancy zoom animation and doesn't even have to be linkable. Just static pictures like that in a grid of 4x2. No spacing or padding or margins between the images. And I contacted the designer of that theme and he mentioned that it is not a plugin that does it. It's custom CSS3. He wasn't any more helpful then that though :/
I'd use an unordered list to contain the images, float the list items and apply a 25% width. The images then need a 100% width, and max-width 100% and height: auto a for responsive layout. The images you upload would need to have the same height dimension (or you could set a fixed height on the list items, but risk losing some image content).
ul#picture_grid {
list-style: none;
width: 100%;
overflow: hidden;
}
#picture_grid li {
float: left;
width: 25%;
}
#picture_grid img {
display: block;
width: 100%;
max-width: 100%;
height: auto;
}

Categories