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
- How to add elements to an empty array in PHP?
- Any guides on creating custom admin pages?
- Decrease file size upload in Media
- Customize default settings on new sites on multisite
- wp_delete_auto_drafts() deletes links in menus
- WP E-commerce: Showing 3 random products from current category when viewing product
- Question about repurposing WordPress 404 handler
- Setting up the child theme so as to enable right-to-left WordPress?
- How do I get content of custom post type through post ID in wordpress
- Hooking new functions to actions + passing parameters
- WordPress template_include filter not working properly
- “The plugin generated 2694 characters of unexpected output…” on Plugin activation, CREATE TABLE sql command not working
- Do I need to prepare query before get_results(), get_row() and get_var()?
- WooCommerce: Add Payment Gateway Field to Webhooks [closed]
- Parsing php string in jquery [closed]
- doing an ajax request always outputs 0
- How to create a linked tag list in my sidebar
- What is the intended purpose of the _wp_attachment_context post meta key?
- Why does my callback function not work with this custom filter hook?
- Get and insert order email address to the PHP template inside HTML text
- Integrating PHP into Javascript to display map markers with Google API – problem with wp_localize
- Send an email to specific adress when button is clicked?
- Sort by page information by Ascending Numbers
- Embedding PHP in shortcode $content
- WordPress wp_redirect error
- single.php error
- php within html within php
- How do I display offsite database info on my wordpress site?
- Get access to variable from previous pageview, excluding ajax-calls
- Show current user posts only
- Issue replacing forward slash in string
- Store and Change Session variable – PHP SESSION VARIABLE
- Show site content based on user role
- PHP Parse error on WP-CLI, not on web server
- Get the id of the row from database on click of a button [closed]
- Plugin can’t write to database even though permissions appear correct?
- Modifying WP URL handing code?
- I can’t set image ad fatured programatically
- Replace a single variable with add_filter
- meta_query search names when they have middle initials
- Not work function add width and height at save post
- Inserting a class on before_widget if checkbox is checked
- Exclude multiple authors by ID – IF condition
- I want to hide “sold by” on certain pages with id page 43
- Used a code to revoke some dashboard menus for my contributors but for some reason it’s revoked me access to the editor [closed]
- How do I get the value of a current user’s custom field?
- Redirect user to a custom url after logged in
- Allow Comments by Default for Multiple Post Types
- HELP! Frontend User Profile Edit Won’t Update Email
- How to get User Avatar Image with link to Author and User name in Html Title tag?
- Make customizer panel or section button
- How to make a parent page for author.php?
- show desktop version of website if button is submited
- To call hook on a php external file
- Create new folder and upload files to custom folder via wp_handle_upload
- Set active class in a Php foeach
- ACF: Echo page title when checkbox is checked
- Hide the content before the more tag in the “single page”
- PHP code for link with text
- how to loop through blog posts in php
- Query posts by custom taxonomy slug in WP REST API?
- oneOf JSON Schema validation not properly working for custom post meta value?
- How can I trim /page/ URL with PHP in WordPress
- Adding date and time to the same request