Thanks everyone for all the help! I really appreciate it. I was able to make it work by removing [0]
in $imgsrc = $img[0];
and using custom_get_meta()
like:
$img = post_movie_get_meta('featured_img')
and:
$img = post_movie_get_meta('backdrop_img')
Related Posts:
- WordPress loop specific thumbnail size
- How can I show the post thumbnail from the most recent of a certain post type, in widget?
- How can I add pagination and how can I change thumbnail size?
- How to pick “full/thumbnail” images in the loop?
- Thumbnail wouldn’t scale to size properly
- How to display thumbnail if post is assigned one otherwise not
- the_post_thumbnail unless video id is added
- How to add condition in wordpress loop? [closed]
- Woocommerce : Can’t get product info in loop
- Display custom post type title as text if post thumbnail is not available
- How to set variable, pass it to a partial file and remove it after?
- how to refresh div on template part?
- Alert Bar section within WP loop is displaying even though there are no posts
- remove post that has no content
- Display category name only once inside loop
- Can’t find infinite loop cause
- Checking array against author id in loop
- How do I Turn This Into An if statement?
- Load wordpress content in other domain
- How Can I use WP_Query to Only Display 1 Post from Custom Post Type if Query Returns Posts with Matching ID in Custom Field
- Checkbox doesn’t stay checked, conten
- Widgets in the loop if active
- List posts that don’t have a specific tag?
- Changing the_posts_navigation() html output
- ‘Post-thumbnails’ feature does not seem to register
- height should be set to auto to avoid pixelation in the post thumbnail function
- Can we count the WordPress Loop
- Get post id within comments loop
- Syntax error when I try to insert my loop into an unordered list? [closed]
- WP_Query fails despite having 1 post
- Three Questions with Twenty Eleven theme
- Display related posts without a plugin
- Add content after the first post in WP Loop
- wp_query get the 2nd post
- Loop stopped working
- How to get post ID in a Page?
- Custom Pagination is Broken
- Display an image if odd number of posts in grid
- How to loop through all the attached images in a post, and get their url one by one
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- PHP Warning: strip_tags() expects parameter 1 to be string?
- WordPress function and string as variable?
- Store post content in a php variable and output them using for loop
- Resize image to specific dimension (X to Y ratio)
- How to add div blocks after certain set of post
- Echo a shortcode div after every 3 posts
- How to avoid duplicates when creating recent network posts
- How to overwrite orderby with add_query_var
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Why in my theme I can’t see all the statics content under the posts?
- 2nd page displaying the exact same posts as my first page (minus the very first post)
- Is the 404 page automatically displayed if a loop returns nothing?
- How do I remove a category from a wordpress loop>
- Apply class to every third list item? [duplicate]
- variable value disappears in a second loop
- Last class on last headline?
- Show recent posts starting at a specific number archive
- Automatically add images to a menu
- get_the_ID() in the footer returns wrong value
- How to get the last category name of a child category?
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- WordPress query undefined offset in loop
- How to pass a variable to get_template_part that’s updated every time the template part is called?
- How to unlink all posts from tracking same amount of views
- Issue with custom loop in Archive page
- Why my loop isn’t working? [closed]
- WordPress loop by meta key that is an array? and how loop multiple arrays
- Only show first image in foreach loop
- use loop to return blog details
- Using featured image of blog archive page
- How to get current post category details inside “loop”?
- if custom field doesn’t exist, use post thumbnail instead, as image background
- How to pass current loop data into nested loop
- Get all posts as an array ID => Name
- How to get post ID from button and pass title to Modal
- WP Query Leads to 502 Bad Gateway (Timeout Because Query Takes Too Long)
- home.php show blog posts as grid view
- Problem with custom loop and wp_list_pluck [closed]
- WP_Query multiple post results
- Convert Featured products loop into Recent products loop?
- Help Fallback (thumbnail)
- Wpdb get->results to out the the month from the db
- How to add post meta in while loop?
- Echoing a CSS class based on category of post in a list
- Display child page content of a specific parent on home page
- Get featured image with custom size outside WordPress
- How to add post thumbnail dynamically using Jquery?
- Do not duplicate posts with multiple categories in multiple loops
- Calling function in loop causes repeat data
- Infinite Loop – WP_Query
- Posts are not looping through correctly
- Else/If Statement to Display Photo Descriptions
- How to set a featured image (thumbnail) with PHP?
- How to wrap every 3 posts in a div (and close the last div too) [closed]
- Dividing the loop to style post differently
- How to change thumbnail src attribute?
- Error display post thumbnails for previous and next post
- Get the featured image url of clicked post
- Fallback image URL if no featured image exists via a shortcode function
- Limit tags shown in post