The relationship field will return an array of post objects, so just count
them:
$related_posts = get_field( 'trailere_filme' );
echo count( $related_posts );
Related Posts:
- Display user’s total comment count outside The Loop
- Specific Loop For 2 Within Each
- How to change post count in wordpress loop?
- Count number of published posts by type
- Adding country tags automatically
- User’s total comment count excluding comments on their own posts
- In WordPress, how do I get the number of posts next to single_cat_title(”); in the category.php file?
- How can I count ACF sub_field with a certain value
- Taxonomy term count
- Counting number of posts in multiple (sub)categories using shortcode
- Like and Dislike Buttons on Post with Counter – Only allow one click per post per user session
- How can I show how much water got saved on this order (making use of the number of items bought) on a thank-you-page?
- Warning: count(): syntax problem of the count () function
- number of posts with “Load More”
- Get the total Author Favorited posts
- For each 3 posts, show a different post type
- WP_Query count of different meta key values [duplicate]
- divide custom field values in div every two values
- How to get the count for each taxonomy term
- How to add together (get the sum) a field from all author’s posts
- Count the number of matching post names in foreach loop
- Custom plugin: Trying to show saved data on frontend
- Is there a browser plugin or method to find which php template an item is coming from?
- Display message once per session to users with a specific role
- How to correct schedule my event weekly with wp_schedule_event()
- How can I add a class to a single menu item?
- WordPress returns a wrong date
- How do I hardcode a WordPress shortcode into my theme?
- WPDB: how to get the value of a field in a custom database table
- Debugging PHP object during Ajax call in WordPress
- How to exclude specific category from the get_the_category(); array
- Memory errors with media upload, WordPress can’t use more than 96M (while there’s 512 available!)
- WordPress override bloginfo variable
- Hide wordpress field if data is empty in post!
- Show MySQL errors that occur when I excute $wpdb->insert()
- Echo a hierarchical list of post data from custom fields
- How to make sure content doesn’t display if selection is empty
- The text box have space character
- Editing Category RSS Feeds
- 3 blogs same installation, without WP MU
- get_avatar won’t show uploaded avatar, only default gravatar
- Need help with Google drive API [closed]
- How to show all pages in blog navigation?
- How to insert data into database using wp cron job
- Different post styles depending on category
- Setting value of session with Ajax not working
- Click a radio button must set textfield value
- 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
- Large Woocommerce Site (83,000 items), What Can I Do? [closed]
- db converts decimal number wrong
- How do I find PHP file that contains content of my page?
- How to keep empty fields from appearing in php?
- Multiple do_shortcode in page template
- Include Parent Term in wp_list_categories
- is_user_logged_in() not working in AJAX validation call
- Does anyone know all parameters of get_comments()
- How can I use a sliced image As banner? [closed]
- Compare $_POST returned values with term array
- Correct PHP to output a single result of a Function with SQL Query
- How to remove the h6 tag for the entry-category Class
- Broken kses.php function “wp_kses_named_entities” crashes WordPress
- Understanding webhooks
- if custom field doesn’t exist, use post thumbnail instead, as image background
- How to add 3 weeks to the_time() function
- wp nav menu: show submenu below li item
- Show different size featured images (the_post_thumbnail) for 1st, 2nd and 3rd posts?
- Show label for value only when value exists, basic php
- WordPress Custom Query: Combining Two Functions
- Display WordPress search results based on the selected Sub-Category
- Reject all malicious URL requests functions.php
- Using some Loop or repeatable fucntion in AJAX and PHP to reduce repeatability
- How do I call a value from the datase using ajax
- Woocommerce disable order item link (backend) [closed]
- Where to add my PHP codes for AJAX Jquery to work?
- Display the list of user’s comments + the post title + date
- Adding ELSE argument to AJAX Live Search for “No results found”
- get_results() doesn’t fetch the result
- How to optimize and reduce excessive database queries
- Comparison operator != not working in field [closed]
- PHP 7.2.18 | Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- How can i style “echo apply_filters”
- get_category_parents to array
- making a search.php query
- Splitting table data to pages with numbers
- How do I generate formatted permalinks as specified in backend options?
- Upload images from one server to an other in wordpress
- List all blogs apart from the current blog and main blog in WordPress Multisite
- Ajax not updating to database
- Custom YouTube Plugin loading different PHP library on live site and localhost
- Issue in url update when using wordpress update query
- Widget edit and add in any page
- How to use Amazon Elastic Transcoder from WordPress using AWS SDK for PHP?
- Sum of Custom Meta written by Authour
- Active class not working on custom menu link using add_menu_page
- Remove duplicates from foreach
- Show items by user_role
- Determine if only one image attached to a post/page
- link to page_for_posts
- WordPress get_the_term_list include class name for heirachy
- WooCommerce – Show ‘Sales’ badge on variable products where only some variations have sales price [closed]