All Questions
7 questions
0
votes
1
answer
62
views
str_replace inside specific css files [closed]
Is it possible to perform str_replace inside an enqueue stylesheet? i can do str_replace on inline style with this function
function replace_text($text) {
$text = str_replace('background-image', '...
0
votes
0
answers
40
views
CSS style and app.js not loading
I'm brand new at theme development.
My directory is the following:
I should see, in the page source (even if I have a blank page) the app.js loaded, but I don't.
This is what I see:
what is wrong in ...
20
votes
2
answers
13k
views
How to add crossorigin and integrity to wp_register_style? (Font Awesome 5)
I am upgrading Font Awesome 4 to version 5 which introduces both integrity and crossorigin attributes to the <link rel="stylesheet"> markup.
Currently, I am using:
wp_register_style('...
0
votes
2
answers
4k
views
different style sheet for just one page template
I've been using site/page builders for so long in WP that I'm OOTL with the current setup of templates, stylesheets and functions in the newer WP builds.
I've got an older theme that I need to make a ...
4
votes
3
answers
13k
views
How to add extra attribute to stylesheet link?
Following Keith Clarks advice, i'd like to load my fonts asynchronously. I try to achieve that by adding:
wp_enqueue_style( 'font-awesome', URI . '/fonts/font-awesome/css/font-awesome.min.css' );
...
1
vote
1
answer
115
views
Include user defined styles without including wp-load
I've looked through the answers on here and none quite match my situation. I have custom CSS that a user can edit and it is saved in the options. I use wp_enqueue_style to include a PHP file with a ...
22
votes
2
answers
1k
views
Is it ever okay to include inline CSS in plugins?
Normally in a plugin I would add styles using wp_enqueue_style. However, I am currently creating a plugin that only needs a few lines of CSS and I am wondering if it might be better to serve the ...