The easiest and simplest way to do it is define a unique variable in your theme’s functions.php
file.
Such as:
<?php
$theme_name_images = get_bloginfo('stylesheet_directory') . '/images/';
?>
No need for classes as a previous answer suggested.
EDIT: It should be get_bloginfo, instead of bloginfo(), as Viper007Bond kindly pointed out.
Related Posts:
- add image size still doesn’t work even after regenerating thumbnails
- I’m trying to add an image in my CSS
- Change Default Image HTML
- Alternate header image
- What is the WordPress Pinecone sitting on top of? [closed]
- Copying post thumbnail to custom field
- Migrating a website using custom image tags to use featured images instead
- how to stop a gallery slideshow
- Is there any way to modify images from a theme using the web interface?
- 1px black line appearing down right side of thumbnails (theme snaps) [closed]
- Featured images are cropped on index and post page
- How to change images size after theme modification?
- Boldy theme – Regarding the images above the boxes
- How to insert a column (part of theme) in the middle of the content body?
- How to change background color in the Notepad++ text editor?
- Does WordPress work without a theme?
- Link to specific Customizer section
- Dash or underscore in theme folder name?
- Do Child-Themes automatically load the Translation from the Parent-Theme?
- Using Multiple Themes in a Single WordPress Site?
- How to override the “inc” folder (or any folder) in a theme using child theme?
- Pre-populating the Page/Post Content Editor with HTML Snippets?
- How to get gallery images?
- Using WordPress as piecemeal in existing site?
- Changing the title of post with code
- Add transparency to wordpress color picker?
- Why is WordPress asking me to update my new (virtually blank) theme?
- During theme installation theme upload failed
- How to find a file in WordPress themes [closed]
- Change title slug or separator in WordPress
- How to configure PoEdit to pick up translation string?
- how to remove padding from left and right side? [closed]
- Free themes for commercial use
- Should a child theme share the same theme options row as the parent, or should it have it’s own options row?
- Installed theme uses get_template_directory, breaks WordPress on Windows
- Switching a Site to WordPress and Leaving It Live Until Ready
- Edited Child Theme’s “header.php” but it doesn’t appear to change the file
- WordPress redwaves-lite theme Comments Quote remove [closed]
- Troubles with Walker_Nav_Menu and closing
- Different logo on homepage
- Translation not working after editing plugin template
- How to apply different themes with custom design in one site?
- How to make Additional css changes global all across the web pages on WordPress website?
- WordPress without a theme – help!
- A /proc folder in wp-content?
- how do i in ignore/disable/delete a javascript call from parent in child theme?
- Problem Installing a Premium Theme– File Permission Issue on a Mac, Local Machine? [closed]
- Is it good practice moving the main stylesheets after the plugin styles?
- Variant of the same theme for each page
- can’t see aditional themes in control panel
- When someone likes an article on my blog, they are prompted to log in on WordPress.com [closed]
- WordPress TwentyTen Theme Incompatible with Theme Unit Test
- What’s the default order used by WordPress to load CSS files?
- WordPress theme logo handling (Trying to use GIF as logo)
- How can I remove all traces of a theme?
- Installing a theme on localhost, Ubuntu 16.04
- Unable to find translations in WordPress theme
- Overwrite add_image_size defined by theme
- A thin line between native wordpress bahaviour and 3rd party themes
- Using filter in the widget causes fatal error
- Display Pointer only once?
- Will I lose the pages I’ve created within a default WordPress theme when adding a new theme?
- Theme title in admin shows full path [closed]
- Is there a way to see how a theme will look before buying it?
- Menu items do not “open” when mouse hover over them?
- From where wp ecommerce is loading plugin theme files?
- Making first post wider than other posts on home page(default)
- In a specific blog, the K2 theme does not have a Text Widget
- How to push a theme update for a ciustom theme used on multiple independant self hosted sites?
- Removing a widget via theme editor
- theme customizations gone after enabling ssl
- Can’t embed certain youtube videos into theme
- How to customize a section of a widget only on certain pages or page
- How do I get the featured image to sit below the header in the twenty nineteen theme?
- Simple filter to change label name of Email Adress to something else
- Basic wordpress search shows no results
- How do I remove search bar that isn’t a widget?
- Show only the beginning of post
- Changing theme folder name disrupts widgets
- WordPress Customazation API section in section
- TwentyFourteen Theme : Changing grid layout
- How can I Update my Theme
- Use random theme
- How to add multiple images in a page
- Replacing current theme folder by previous version of the same folder produces “undefined function get_header()” error
- Theme comment callback results nothing
- Does not work bookmarklet in the theme Tagology
- How do I block a subdirectory from WordPress theming?
- Category page with gallery for each post
- How to remove the option data of a theme when that theme is removed?
- Resetting Themes Folder to Default
- Sub-Theme (based on Taxonomies)
- How to Hide Blog Post Author?
- Adding a wp_head hook from an included PHP file
- Deleting Widgets in sidebar in Panthea theme
- Help with Divi logo not appearing for 10s
- WordPress Theme: replace logo image with title site if file doesn´t exist on server
- How to clone a theme template from within WordPress? [closed]
- Disabling Full Site Editor (FSE)
- get_post_meta() doesn’t allow email