How to Manually Edit Files in WordPress/WooCommerce?

0
14
Asked By CreativeCactus86 On

I've been working with HTML and CSS in NotePad++ for a while and really enjoy it because it's straightforward to test and fix things. However, transitioning to WordPress feels chaotic to me. I can handle uploading plugins via FTP, but I struggle to locate the right files for manual editing. I'm anticipating needing to make some edits to meet validation requirements, like fixing trailing slashes on void elements. It's also frustrating to see so many CSS files—it feels cluttered compared to my tidy setup. Beyond that, I have issues with the cart preview displaying improperly in Chrome. I need some guidance on where to locate the files and folders for manual edits. I'd also like to customize what the 'add to cart' button says, but I'm tired of relying on plugins that don't let me change the button text after an item is added. I want my webshop to reflect my company's image without unnecessary clutter or features that slow the system down. Any help or direction would be greatly appreciated!

3 Answers

Answered By CodeWhisperer99 On

Welcome! You've definitely joined a journey when it comes to WordPress. First off, stick to the '+wp-content+' directory for your edits—especially the '+themes+' folder for your active theme. Avoid touching '+wp-admin+' or '+wp-includes+' because updates can overwrite your changes. Instead, create a child theme for your custom edits. It's the safest route! Also, check out WordPress hooks—they're a great way to add custom functionality without messing with core files. Once you get the hang of it, you'll be glad you did!

CleverOwl77 -

Thanks for the advice! I really want to avoid making changes that could cause issues later, so I appreciate the insight on child themes and hooks.

Answered By CSSGuru88 On

If you're struggling with cart layout issues, I suggest adding some CSS to control its overflow. Just navigate to '**Appearance → Customize → Additional CSS**' and use:

```css
.woocommerce-mini-cart {
max-height: 90vh;
overflow-y: auto;
}
```
This should help keep the cart from extending beyond the screen in Chrome. If you're still experiencing problems with buttons not showing up on hover, there could be other CSS conflicts at play. I'd recommend using the dev tools in your browser to inspect the elements and troubleshoot further.

OptimisticCoder33 -

I tried that CSS but it didn’t quite fix the problem. Some buttons seem to disappear on hover. Could it be an issue with the theme I'm using?

Answered By DevMindset12 On

Setting up a development environment is key before making any changes. This way, you can test everything without affecting your live site. For WooCommerce, the templates you want to edit are found in the '+woocommerce+' plugin directory. Familiarize yourself with their documentation for all the details. If you'd like to change the text of the 'add to cart' button, you can do that through your child theme's '+functions.php+' file. Check WooCommerce’s documentation on how to customize that text!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.