I believe using wp_enqueue_style()
is basic and more appropriate.
If you wanted the stylesheet to only be referenced on a particular page template then you do this
if ( is_page_template('template-directory/template-name.php')) { wp_enqueue_style( 'theme_css', get_template_directory_uri() . '/directory/filename.css'); }
or you just do this if it is not specific to a page template.
wp_enqueue_style( 'theme_css', get_template_directory_uri() . '/directory/filename.css');
This piece of code will need to go in your functions.php file. Read more about it here -> https://developer.wordpress.org/themes/basics/including-css-javascript/#stylesheets
You also want to be careful about the order in which you have referenced your css files -> In which order do CSS stylesheets override?
Related Posts:
- WordPress Salient theme: getting a full width 2 columns portfolio
- The requested URL /about was not found on this server
- CSS background images in WordPress
- Redirect after Login on WordPress
- How to remove unwanted space in wordpress OMG Blog theme?
- WordPress asking for my FTP credentials to install plugins
- WordPress asking for my FTP credentials to install plugins
- WordPress how to remove blocksy theme price and put my own price
- In WordPress Using Elegant Theme’s Divi Theme, Long menus don’t show
- WordPress: How to overlay text / widget div on top of a revolution slider
- Links not clickable on mobile devices in WordPress
- Find source of Google Fonts in WordPress
- How do i download code files of the website from wordpress.com?
- Astra Pro theme for WordPress why isn’t logo showing?
- language flags (Image links) with css not work in WordPress costum theme
- Is it possible to combine a WordPress template (Semplice) and some HTML & CSS pages?
- WordPress Email Share button not opening in Outlook
- how do u change the link color of one specific link in wordpress?
- Embedding a Square Appointments script into a WordPress site – it’s rendering fullscreen in the preview pane, so I can’t edit other content. Thoughts?
- how to create a custom live search in WordPress from scratch
- Changing code font size on wordpress
- WordPress website broken in Facebook mobile browser
- How to find HTML rendered by in WordPress?
- Local wordpress install only shows home page, all other pages Not Found
- how to add gravity forms to blog page(posts page) in WordPress
- Oxygen Builder with theme in WordPress
- Internet Explorer 8 issues with WordPress 3.8
- Internet Explorer 8 issues with WordPress 3.8
- Set size of WordPress thumbnail post
- Divi Child Theme Breaks WordPress Customizer
- Lucida calligraphy font not working wordpress site in android chrome
- How to apply font on WordPress?
- In wordpress how can I scrape and show social media data of users like in upfluence.com and shoutcart.com?
- Cuelinks widget’s half part is getting hidden on WordPress website
- How to change “Leave a Reply” title in wordpress twentyfifteen theme
- Custom CSS on WordPress parent and child pages
- WordPress- url for localhost wp-admin is not working
- WordPress- url for localhost wp-admin is not working
- Muffin Builder has a limit? (WordPress – Be Theme)
- WordPress “Save Draft” fails: “the response is not a valid JSON response”
- How to use wp_mail() function in wordpress
- Where to start in the WordPress codex?
- How to correctly use get_template_directory_uri() WordPress function to load an image that is in a subfolder of my theme?
- Correct way of using wp_get_attachment_image() in wordpress
- Custom CSS in WordPress messing up
- How to hidden field in contact form 7
- Not Authorized to View This Page
- PHP fopen() Error: failed to open stream: Permission denied
- What does this mean in my website console: “JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate.min.js?ver=1.4.1:2 “
- Child theme css not overriding parent
- How to decode encrypted wordpress admin password?
- Woocommerce variable products: Sorry, this product is unavailable. Please choose a different combination
- strange text before my header wordpress
- More Than One OG URL Specified and only Yoast graph is open not Jetpack
- Proper way to get page content
- Display Images Inline via CSS
- WordPress admin bar not showing on frontend
- How can I make my header image properly responsive?
- WordPress get plugin directory
- How to put Youku video on my wordpress site?
- Formidable Forms WordPress Plugin
- How to implement inline cm/inches conversion in WordPress
- How do I use WordPress with HostGator?
- How do I use WordPress with HostGator?
- JS Manga Reader with WordPress NoConflict JQuery
- Redirect old php link to wordpress link in .htaccess
- Redirect old php link to wordpress link in .htaccess
- WordPress qw.php file on root of installation
- How to change thumbnails for WordPress pages (KakaoTalk)
- My UPS shipping method is not working in wordpress project
- google my maps ~ custom map embed into wordpress
- google my maps ~ custom map embed into wordpress
- Remove “Protected” text in title h1 of protected wordpress pages
- How do I find what causes a blank white screen in WordPress?
- How to convert JPG to PNG on upload in WordPress (via add_image_size)?
- WordPress plugin install: Could not create directory
- How to prevent attacks on WordPress wp-login.php page
- Move WordPress site from Yahoo Small Business
- What is the meaning of ‘OFFSET’ => 1 (WordPress)
- Problem when embedding images on Discord Webhook (Image hosted on a WordPress website)
- Using CloudConvert API in WordPress
- how can i get a sign in/ Register plug in like fiverr.com’s on WordPress
- WordPress makes an auto-draft as soon as I enter the page
- Using WordPress on 000webhost.com
- Add CashU payment gateway to WordPress Woocommerce
- Display only one category on home page wordpress
- WordPress custom thumbnail size
- WordPress custom thumbnail size
- Php – Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- Php – Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- How can I block doubleclick.net cookie from my wordpress website?
- Moving WordPress from MAMP to WAMP, can’t access pages
- Moving WordPress from MAMP to WAMP, can’t access pages
- Adding custom posts into avada wordpress
- Local WordPress installation is stripping ‘wp-admin’ from URL on WordPress admin dashboard
- How can I block doubleclick.net cookie from my wordpress website?
- How To Change Default Image Thumbnail Sizes in WordPress
- Advanced Custom Fields, Yoast SEO, not updating new values in WordPress
- How to find out who is hosting my WordPress site?
- Can I install/update WordPress plugins without providing FTP access?