Something along these lines should work:
if ( $the_query->have_posts()){
while ( $the_query->have_posts() ) : $the_query->the_post();
echo '<div class="actor-box-related"><a class="actor-titlu" href="';
the_permalink();
echo '" title="'.get_the_title().'">';
?>
<img class="actor-img" src="/scripts/timthumb.php?src=<?php the_field('img'); ?>&h=110&w=75&zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>"/>
<?php the_title();
echo '</a></div>';
endwhile;
} else {
echo("No movie by this actor");
}
Related Posts:
- Only get_posts of certain post formats
- Is the first item returned by get_posts() always the latest post?
- Why can I not use setup_postdata($post) in the sidebar?
- How to retrieve a value from get_posts()? [closed]
- Getting movie and serial on actor page
- how to display active, upcoming and past event with featured listing with pagination
- Display 4 chronological posts starting with a random post
- How do I output a database option that is an array into a get_posts array?
- Advanced Custom Fields: Post Object – Not returning data [closed]
- Why not yield/iterable in posts interface?
- Logged in user ID as post ID
- How do I exclude recent post from recent post php widget
- Open post-content in archive page in a Modal box with bootstrap
- get_posts() and WP_query limits ‘AND’ conditions to a maximum of 6 for meta value queries in WordPress
- Query if audio attachment AND/OR custom field
- How do I get post attachments in menu_order in WordPress?
- PHP Syntax Error on get_posts
- How i can get post data from database when i am getting post id from url in wordpress
- How to get image from url from the database?
- Unable to render custom field after attempt to generate a list of recent post in page template
- Add class to every other posts using get_posts
- search.php to search only the post title
- How to get woocommerce orders with get_posts method in a shortcode
- get value from get_post_meta then reuse it in another get_post_meta
- Foreach Loop Of Post Types With Nested If Else If Not Completing Process
- How can I render more than multiple posts on template-parts with post formats
- How to display post_content from database in different on template page?
- Displaying POST content with HTML tags and all
- Create a hierarchical loop at predefined markup requirements
- offset and max_num_pages in pagination gallery
- Even with PHP plugin get_posts not working in widget area
- Sort posts by title, sort array by largest number [duplicate]
- Transient Loop Not working as expected
- show/hide attachments
- Find owner of coupon
- Link on post title only if post have content
- Category Attachment Pagination 404 Error on 2nd Page
- count() parameter must be an array or an object that implements countable in laravel
- Reposition WooCommerce breadcrumb outside of wrapper content
- Display all values of custom a field created with ACF on a page
- Allowed memory size of 268435456 bytes exhausted (tried to allocate 7146491840906359738 bytes)
- Receiving Stripe Webhooks on a wordpress website
- Sorting list of sites from multisite network using wp_get_sites
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- How to validate WordPress generated password in DB using PHP?
- wpdb::prepare was called incorrectly
- PHP XMLRPC for WordPress: Adding meta tags and description
- WordPress the_content() return only one image from a specific category
- How do I get the author’s page url from their ID?
- count number of user comments with a specific comment meta value
- Correct use of curly braces vs alternative synax
- How can I access the “description” of a menu item?
- Display all posts in current category
- Missing Author Information
- How can I set custom order use this function
- How do I know what variables are passed in a filter/action and what their meaning is?
- How to set a link different behavior for logged and non-logged user?
- How does WP detect format type (and can I make use of this)?
- Remove “Remember Me” from login form
- Wrap each shortcode in array to div
- How can I change WordPress domain from remote to localhost?
- Notify WordPress Site I Have Linked To Them
- Warning: array_pop() expects parameter 1 to be array, boolean given
- Check if Product is in a Specific Category in Functions.php
- How to generate HMAC-SHA1 signature to use with WP REST API and OAuth1
- Woocommerce filter cart and category specific quantity [closed]
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- How to send user data in json format to another server when user register on wordpress site in PHP
- Ajax form submit within a Post Metabox
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- How to Display Image Meta underneath EVERY image in EVERY post
- Problem adding class to body_class
- Shortcode API: How to get name that matched shortcode RegEx?
- Trying to implement Ajax comments in WordPress, getting WP error
- SQL QUERY – Select a value directly from the database
- Fetch posts from category in custom page template
- How do you use WP slugs for PDF files / media?
- Nesting if statements to echo only one string based on what tag was filtered?
- How to properly loop through these external URLs to get them into the sitemap using this hook
- Set the checkbox as checked by default at options page
- Input type search in Menu
- Swapping wp_dropdown_categories function with wp_category_checklist
- Is there a way to programmatically create multiple pages utilizing the same template but different content from a json file?
- If no products are on sale – hide ID or class
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- Custom shortcode outputs plain text instead of HTML at top of post
- how can i use $_COOKIE[] + PostID to execute the below code?
- Gravity form built in Captcha
- Autocomplete search box
- How do I display the main domain for my WordPress install?
- Create Page To Count Comments For Each Post In WordPress Site
- Why my image upload button is not working in wordpress widget area?
- How does wp_enqueue_scripts work?
- Fetching instagram api not working on wordpress
- add_theme_page to add_menu_page theme options convert
- WordPress Scripts Being Loaded in Footer
- You do not have sufficient permissions to access this page while making a plugin
- How to let users change site language?
- Problem with login form
- Use of wp_insert_post and parameters