2020-04-06, 13:07:47
2020-04-06, 17:41:32
Hi johnywhy,
They are all part of the assets folder inside your theme folder
(it is called the assets folder for a reason)
Javascript libraries and scripts go in the js folder which you can find in the assets folder
Same for your css scripts which go also in it's own css folder in the assets folder
the img folder holds only images and icons that are called by js and css scripts
if your site uses special fonts to beautify your text put them in the folder fonts
if your site uses font awesome then put its css in the css folder and put it's webfonts folder
on the same level in the assets folder, see below :
/your-theme/assets/css
img
js
fonts
webfonts
They are all part of the assets folder inside your theme folder
(it is called the assets folder for a reason)
Javascript libraries and scripts go in the js folder which you can find in the assets folder
Same for your css scripts which go also in it's own css folder in the assets folder
the img folder holds only images and icons that are called by js and css scripts
if your site uses special fonts to beautify your text put them in the folder fonts
if your site uses font awesome then put its css in the css folder and put it's webfonts folder
on the same level in the assets folder, see below :
/your-theme/assets/css
img
js
fonts
webfonts
2020-04-17, 08:28:47
Thx, now in which file do i put my javascript file-inclusion?
Is there an index.html?
thx
Is there an index.html?
thx
2020-04-17, 23:03:53
Hi johnywhy,
You put it (or better said: you call it) between the <head> and </head> tags in the header.inc.php
Replace your-css.css with the css you need in your website
Replace your-javascript.js with the javascript you need in your website
Example:
F.
You put it (or better said: you call it) between the <head> and </head> tags in the header.inc.php
Replace your-css.css with the css you need in your website
Replace your-javascript.js with the javascript you need in your website
Example:
Code:
<head>
<title>your-title</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="<?php get_theme_url(); ?>/assets/css/your-css.css">
<script src="<?php get_theme_url(); ?>/assets/js/jquery-1.7.min.js"></script>
<script src="<?php get_theme_url(); ?>/assets/js/your-javascript.js"></script>
</head>
F.
2022-11-18, 10:32:05
Won't anything in the theme folder get overwritten if the theme is updated?
What if i want the script accessible to all themes?
It seems data folder is the best place, because data is the only folder that won't get overwritten by gs updates, right?
What if i want the script accessible to all themes?
It seems data folder is the best place, because data is the only folder that won't get overwritten by gs updates, right?