As I was getting at in comment:
-
get_stylesheet_directory()
produces local filesystem path -
get_stylesheet_directory_uri()
produces URL
Just use latter. 🙂
Related Posts:
- How to move page template files like page-{slug}.php to a sub-directory?
- What WP folder can I use to write files to?
- Retrieve the template directory URI via global or get_template_directory_uri() every time?
- Move my theme style.css into a folder
- When developing a distributable Theme, does it HAVE to be “inheritable”?
- Can wordpress run in root of existing php site with no theme on index.php but all other WP posts/pages?
- Add a theme via symlink
- Loading files for theme and child theme (Require)
- WordPress page templates in a directory
- Is it possible to make *.js and folders visible in theme-editor
- How do I include a partial from a directory below a wordpress theme directory?
- index.php file in wp-content/themes/ folder
- get main URL from subdirectory with php
- Make theme editor to show all theme’s files
- Extracting Distance from FacetWP Proximity Function to Display in WordPress Template
- What is the preferred way to add custom javascript files to the site?
- Should I use set_transient or update_option?
- How do I check if a menu exists?
- How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]
- Adding Content Areas to Custom Page Template
- Add class to before_widget for all widgets with a dropdown and a counter
- What is the best practice for customizing a plugin’s JavaScript/jQuery?
- Trouble with conditional tags
- How to use Iris color picker on front-end?
- How Does One Change The Meta-Description Of Home-Page?
- create blocks programmtically on theme activation
- Possible to add “Template” selector to posts?
- Set front page as static page [closed]
- Adding LazyLoad and InfiniteScroll to WordPress Theme
- Theme Customizer – Choose where widget area appears, to let users organise widgets
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Adding default pagination to wordpress loop
- Translation-readiness of Koi theme
- If I build a custom theme, will it update?
- Recommended tools for Theme Development with SASS [closed]
- How to add font in wordpress
- What tags should be used for themes to show the type of layout?
- enqueue_style is not working
- What are non-printable characters doing in my theme?
- Theme settings keep getting reset/erased
- Implement content-nosidebar.php / content-leftsidebar.php
- How to change i18n/l10n of #reply-title? (Old title: Comment reply link not working)
- How to call WooCommerce update cart function programatically
- Lightweight framework [closed]
- What are the Entry classes for?
- Using an if statement in the theme customizer page
- Installing WordPress locally
- Custom markup with wp_nav_menu based on pages
- How to edit my theme for full width?
- What VSCode extensions are there for working with block themes? [closed]
- What is the “correct” way to add hooks or similar PHP behavior to a blocktheme?
- Fetch wordpress video attachment with post ID
- Following Web Performance Optimization techniques to output static and dynamic css
- Echo all category names, apart from one
- Is it possible to visually group items on the theme customizer?
- Internal Stylesheet in WordPress Theme development
- How can I develop multiple widgets for a WordPress theme?
- Is there a way to optionally hide the title bar when logged in?
- How to create first post, fifth post full width, rest in three columns and so on
- How to Create custom xml file for demo content for custom theme?
- post_exists returning 0 if title contain special characters
- Theme not showing up
- How can I compare publish and update dates for a single post?
- Displaying the right content on a page url
- Why WordPress AJAX returns undefined however it works fine when I add static url instead of dynamic function?
- Adding a new setting using Kirki or WP customizer with an if statement
- Custom admin logo not showing after wordpress 4.5 upgrade
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- Translate a child theme with pure PHP and gettext
- Pagination: Keep prev and next link even on the first/ last page
- How to remove permalinks links presents in each page of my site?
- Is there a way to serve different resolution images to different devices?
- How to substitute old wordpress menu by wp 3 menu the right way?
- Why my theme option not working?
- How to use multiple check-box values to work in a function and insert values in database
- Catch the moment when theme is deleted
- Attribute form NumberControl doesn’t update when I update page before it lose its focus
- Next and previous post link shows error in first and last post
- create loop for the_content()
- how to change footer content for certain pages only
- Should I use template files or just use conditional tags in index.php?
- Media & Plugin screens stall
- wp_kses allow checkbox class and checked
- Is wp_mail plugin territory?
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- How do I remove p tag *insertions*? Disabling `wpautop` removes manual tags
- Create a variable with string, array or multiple values
- How can I include the js and css file of my custom theme dynamically in header.php
- WordPress Blog Page displaying nothing
- Full width thumbnail
- What hook to use for loading a custom class extension during Theme initialization?
- Set start page depending on screen width [closed]
- How can I change the title of the Home link in the navigation bar?
- What is the advantage of using home.php over index.php for the front page
- Add option for administrator to submit link
- Display recent posts on front page
- Creating image grid on products page in wordpress
- Insert gutenberg blocks into template
- What is the point of using archive.php instead of index.php?
- How to make it so I can “use” template parts in (classic/full) site editor