Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2023-02-24 17:57:09
- murnau
- Member
- From: Lower Saxony, Germany
- Registered: 2022-10-23
- Posts: 11
Add custom.css to website -path?
I wanted to add a custom.css to my website, using the following path in the page seems not to work…
<link rel="stylesheet" href="<txp:site_url />themes/four-point-eight/styles/custom.css" />
Last edited by murnau (2023-02-24 18:03:26)
Offline
Re: Add custom.css to website -path?
murnau wrote #334747:
I wanted to add a custom.css to my website, using the following path in the page seems not to work…
<link rel="stylesheet" href="<txp:site_url />themes/four-point-eight/styles/custom.css" />...
i use this approach
<link rel='stylesheet' id='style-css' href='https://mysite.com/assets/css/style.css' type='text/css' media='all' />..
…. texted postive
Offline
Re: Add custom.css to website -path?
murnau wrote #334747:
I wanted to add a custom.css to my website, using the following path in the page seems not to work…
<link rel="stylesheet" href="<txp:site_url />themes/four-point-eight/styles/custom.css" />...
Did you first export the theme to the file system?
From the Theme panel, select the theme (checkbox) and then from the select widget below, select export. Your whole collection of templates: pages, forms and styles will then be available on the file system, in the /themes
folder/directory.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Add custom.css to website -path?
PS, I realise now, maybe you mean that to you added a custom.css on the Styles Panel.
Using the <txp:css />
tag you can reference it in your templates (documentation).
<txp:css format="link" name="custom.css" />
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
#5 2023-02-27 07:25:20
- murnau
- Member
- From: Lower Saxony, Germany
- Registered: 2022-10-23
- Posts: 11
Re: Add custom.css to website -path?
Thank you for your help!
The solution works!
In the ‘theme-panel’ I had to export the theme first.
Then adding the custom.css path to the page:
<link rel="stylesheet" id="style-css" href="<txp:site_url />themes/four-point-eight/styles/custom.css" />
Last edited by murnau (2023-02-27 07:28:30)
Offline
Pages: 1