I am trying to change my stylesheet but i can't find it in Wordpress. I also use LESS/SASS. Searched over the whole internet but can't find my solution, so I try it via Stackoverflow.
Thanks in advance...
Login into WordPress, there you should have a section called "Themes" or "Design". Choose "Theme Editor". There will be a list of all the files you can edit, the CSS stylesheet should be named style.css.
You should find it in the following directory wp-content/themes/your-theme/style.css. If you're theme is using LESS and SASS then there may be a folder for those files.
Often in :
wp-content/themes/theme_name/style.css
But often, there are many stylesheets. You can view source of you website to get the name of avtices stylesheets (if you see <link> with XXX.css, you know that this style sheet is active, and you can get the path).
Related
I want to use a SVG logo in my woocommerce storefront theme. I can't use the Customizer b/c it won't allow SVG uploads. Is there a way around that restriction?
If not, how would I edit the hook/action to use the SVG?
I see the storefront_site_branding template function in the storefront/inc folder and I tried creating an inc folder in the child theme but apparently the override does not work on files within the inc folder.
If you are using a child-theme you can add this to your functions.php, if you update you themes functions.php it may override during your next patch/update.
I sourced this code from:
https://themeisle.com/blog/add-svg-to-wordpress/
Method 1: Use the SVG Support plugin
If you’re looking for the fastest way to add SVG to WordPress, this is it. We’re going to use the SVG Support plugin, which enables this particular image format and adds support for it to your media library:
The process is simple. You just need to install and activate the plugin as usual, and then you’ll be able to add SVGs to your WordPress site.
WordPress now requires us to have the tag in our SVG files before uploading. Please open your SVG file in any code editor (such as sublime text) and add the following to the very first line of your SVG file and save, so that you don’t encounter security errors:
<?xml version="1.0" encoding="utf-8"?>
However, there are two more settings you might want to change depending on your needs. First off, let’s go to the Settings → SVG Support tab:
How to add SVG to WordPress using SVG Support plugin
Inside, you’ll find two options. The first turns on the plugin’s Advanced Mode, which lets you target your SVGs with CSS. If you don’t want to animate your SVGs, then you can skip this option.
Second, you can also restrict the ability to upload SVGs to administrators only by enabling the Restrict to Administrators? feature. That one’s up to you!
Method 2: Modify your site’s functions.php file
Every WordPress website has its own functions.php file. This essential component includes important functions, classes, and filters. It’s also your ticket to adding SVG support to WordPress through a few lines of code.
To reach this file, you’ll need to access your website via FTP. If you don’t have a client, we recommend using FileZilla. Once you’ve found your FTP credentials and accessed your site, you’ll want to head to your root folder, which is usually either called public_html or named after your site:
The WordPress root folder.
Now, enter the wp-includes folder and look for the functions.php file within. It’s important to note that this is the parent file, while there are also individual functions.php files for each of your themes:
The wp-includes folder.
For this example, we’ll add the code to the parent file. However, you may find the changes are lost when WordPress is updated, so feel free to alternatively add it to your theme-specific functions.php file depending on the approach you’re more comfortable with.
(Editor’s note: Doing this in your theme’s functions file is actually the recommended approach.)
Access the functions.php file now by right-clicking on it and choosing the View/Edit option. This will open it using your default text editor. Now, scroll to the bottom and paste this code snippet there:
function add_file_types_to_uploads($file_types){
$new_filetypes = array();
$new_filetypes['svg'] = 'image/svg+xml';
$file_types = array_merge($file_types, $new_filetypes );
return $file_types;
}
add_filter('upload_mimes', 'add_file_types_to_uploads');
hope you're doing fine.
I am currently stuck with my Web App project. This is the context: I would like to code a Web App using J2E. There's a free template that I liked and thus I decided to download it. When starting to use it I notice the CSS isn't applied.
Instead of having this, I have this:
However I do not see where the error is. The CSS & Bootstrap files should be visible in the JSP file and IntelliJ recognizes them. However I can't display these files (whether css or even pictures) that are referenced in "href".
Here's the project structure and code, maybe something's wrong there.
I'm used to HTML and to my understanding JSP isn't too different. Are the referencings different though?
Thanks in advance for any help you'll give,
Fares
YES.
Found the answer. Put resources in different folder than WEB-INF.
I believe that, your HTML file is inside the WEB-INF folder, for the to work either remove the WEB-INF path
<link href='style/stylesheet.css'>
or move your HTML one folder up.
I am new to nopCommerce and trying to make HTML to theme on it I googled lots of things but not able to get proper way to create customized theme nopCommerce, can any one help,
Thanks in advance
The easiest way:
Copy the folder at ~/Themes/DarkOrange to ~/Themes/YOUR_THEME. Modify the corresponding items in theme.config.
If you need to change any view, copy that view from ~/Views/SUB_FOLDER/FILE_NAME.cshtml and paste it under ~/Themes/YOUR_THEME/SUB_FOLDER/FILE_NAME.cshtml.
For example, if you want to change the code in ~/Views/Shared/_ColumnsOne.cshtml, copy that file and paste it under ~/Themes/YOUR_THEME/Shared/_ColumnsOne.cshtml.
If you do not need to change any view, then modifying ~/Themes/YOUR_THEME/Content/styles.css is enough. (Also make sure you update ~/Themes/YOUR_THEME/Views/Shared/Head.cshtml to point to your CSS)
Rule of Thumb: nopCommerce will look for the specific view in your theme. If it can't find the view then it falls back to the original views at ~/Views. Otherwise your theme's views override the original views.
In addition to the Designers guide there are some nice articles describing why and how to use nopCommerce themes:
Why nopCommerce Theme?
How to create nopCommerce themes
A little help here: Overview (Designer's Guide)
Copy all the files inside ~/Views to your Themes: ~/Themes/YourTheme/Views
Then just modify any .cshtml file inside.
I hope it helps!
I want to use custom css/js. I have moved these to the server. But the drupal page starts with a section. how do I add the custom css/js to my drupal site page. I have admin and just need to know what to do to get this included on the page. Please send exact steps as I am totally new to drupal. Thanks
"Custom CSS and JavaScript files" module allows to specify two folders, one for CSS and one for JS where the stylesheets and javascripts files are located respectively.
The module creates two sub-folders under your files folder:
files/customcssjs/css
files/customcssjs/js
Indeed, it's depend on your task, what css and js files should do, and adding these in custom module (drupal_add_js, drupal_add_css) or custom theme (info file, preprocess in template.php or directly in page-XXX.tpl.php and so on).
I have been asked by a customer to edit there ecommerce website, the cms system they use is Magento, how would i go about changing the category page html coding as i need to change a h2 to a h1. Were is it stored on the FTP so i can download edit html and then reupload. i have tried to go to /public_html/app/design/frontend/base/mylightbulb/template/catalog/category and the view.phtml does not contain the html i am after
Thanks
Magento's template is quite complicated (but flexible), but one way to find out where the HTML for a 'block' is located is by enabling Template Path Hints.
You should be able to edit their theme file for the category page here
/app/design/frontend/themepackage/theme/template/catalog/category/view.phtml