Whenever using any WordPress function with get_xyz_etc() make sure you ECHO the function if you want to output the value there:
<img class="first-slide" src="https://wordpress.stackexchange.com/questions/203434/<?php echo get_template_directory_uri() ."/images/landing-banner.png'; ?>" alt="First slide">
It will now output the path!
Related Posts:
- Multiple is_page() in page.php
- class=”parent” for wp_list_pages?
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- Listing all sub-pages?
- syntax issue on php 7.4
- How do I publish only one page to production after making changes on staging?
- Can’t load WP function into external function
- Can’t get page content in WordPress
- Way to querry data (tags) from a wordpress database?
- Populate editor with some content of a page with a page template
- Create Page To Count Comments For Each Post In WordPress Site
- Inject class in body when particular page template is used
- Use .php file as page instead of wordpress page & template file?
- Use WordPress function in php file
- Need php code’s output to display underneath a Divi Module
- PHP Output also in Child theme, but different
- How to Display a List of Child Pages For a Parent Page in WordPress
- A function to get the content of a page
- Getting page / post URL on publish and / or update
- How to return a Boolean for a page that is a subpage thru its name?
- How to set and use global variables? Or why not to use them at all
- How to Add Image to WordPress RSS-Feed with no Plug-in?
- How to check if feed URL was requested?
- Is it possible to disable a function of a parent theme?
- Enqueue Javascript Correctly for 3.5
- How to add active class to custom menu using while loop and wp_list_pages
- Cleanest/Fastest way to avoid calling and retrieving data from the database multiple times?
- Add footer.php to WordPress child theme
- Need to get specific data from array
- WooCommerce – Display variation custom field value [closed]
- Restrict WordPress File Type Uploads by User Type
- Woocommerce HTML email option unavailable
- Use template for posts with a particular category grandparent
- How to slow down server response
- Click loads template via ajax
- Randomise upload filenames (or another solution to hide the original image URL from theft?)
- Function set default image when image not present
- Use menu link or onClick to set a variable
- Automatically remove a canceled order in Woocommerce
- WordPress add post format support not working
- Page Automatically Generated from Theme?
- How to remove the cufon script from Dzonia Lite theme [closed]
- How to put “Read more” link in Custom Excerpt inside p tag?
- Get users that likes the post
- Create highly customized submenu (possibly using wp_list_pages)
- $wpdb->wp_users returning empty value for
- WordPress Custom field Colors
- php syntax : [ && ] between commands [closed]
- My custom get_the_excerpt() can’t get excerpt by ID
- Which PHP page is the Default Posts Page
- meaning of (array)function()
- Sending a custom form data in email through WP Mail Function
- deactivating an active plugin using if page
- esc_url( ) won’t use https
- My php code is not being executed
- Where is this function’s callback getting its arguments from?
- Warning: in_array() null given in PHP function
- Use post ID in functions.php file adminside
- How to: Conditionally Enqueue JS and Stylesheets, for Custom Post Type (Single and Archive Templates)
- How can I count ACF sub_field with a certain value
- change the default order of posts only for specific categories
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Custom posts password protect
- How to get post category list as select in front-end?
- How to use functions [closed]
- Splitting the_content() by size?
- Function to call either single post or category
- Updating Metadata with Shortcode
- can’t load .po file in functions.php
- Woocommerce – Exclude variation attribute on specific variation
- How do I add a function to parent theme
- Are there any drawbacks on opening a session_start in functions.php and header.php?
- Create shortcode for metabox gallery
- Add Pre-Defined Value to Click Counter in WordPress
- How can I redefine WordPress wp-content directory programmatically?
- Trim Titles Only On Some Pages
- Show data obtained from a function and place it in a shortocode function
- How to override theme’s public static function inside of a trait?
- Delete empty title_tags, find a h1 heading and echo it
- WP_Query To Display Product Of Brand On Taxonomy Page
- ajaxurl usage for a custom function
- oembed facebook link?
- Open/closed function [closed]
- Search for images that width and height is more than 500
- add a value to an external link query in searchform
- wordpress ajax return 0
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- site_url() returns with additional backslashes
- Overwriting a Shortcode
- WP Ecommerce: Display the “Order Notes” as column in the Sales Log [closed]
- How to call a specific value within the functions.php file?
- What is the wrong with this function to enqueue the scripts and styles to the theme? [closed]
- Warning: Attempt to read property “term_id” on int – Woocommerce
- Warning: filemtime(): stat failed for wp_
- Keep users logged in Without Remember Me
- How to use js variable to php in wordpress functions.php
- Dynamic Email Handler with ‘header (“Location: …’
- WooCommerce: write featured image dimensions to custom fields in product’
- transition_post_status hook, works – but not if the post is new
- Custom plugin doesn’t show in admin menu – when code added, displays an empty page