They’re both doing the same thing. If you don’t pass a post ID, get_the_title()
will just use the current post and go about it’s business. The performance difference between passing a postID and not passing a postID is, if anything at all, is extremely minor.
Related Posts:
- Too many posts cause slow load when paginating
- Slow page loads due to WordPress Core Query
- How to increase load time of an archive/search page (WP_Query)
- Performance concerns: index.php vs taxonomy-$taxonomy.php
- Some doubts about how the main query and the custom query works in this custom theme?
- Wp get all the sub pages of the parent using wp query
- How to query for most viewed posts and show top 5
- Query Posts in a Predefined Order
- Differences Between WP_Query() and get_posts() for Querying Posts?
- WordPress Custom Query to show posts from last x years
- Get posts by meta data OR title
- Perform query with meta_value date
- Using is_main_query to select custom post type on certain page
- WP_Query ordered by custom field that is a date string?
- Display Posts by modifying the where clause only for my query
- How do I create my own nested meta_query using posts_where / posts_join?
- Best practice for multiple queries on page
- How to Get All Posts but the Private ones?
- How to query ‘posts_per_page’ to display a different blog posts index template?
- Slow speed and high CPU usage for my code. How to improve it?
- Multiple queries on Home Page – page load/site speed issue
- How to find out what “Blog pages show at most” is set to [duplicate]
- WP_Query Performance Issues with meta_query
- Retrieve or Query Pages by ID
- How do you query wordpress posts using a math formula between multiple meta field values?
- How to implement time filter to show random post 1 month for one category and 3 months for other categories
- Multiple instances of Featured Image Query
- How can I pick a single post from the latest 3?
- How do you Query posts with nothing in common?
- Custom category search box for WordPress
- Order a query result by a numeric meta key even if it does not exist, but put the posts with meta key first
- Query with custom taxonomy not working
- Improving WP_Query for performance when random posts are ordered
- Query posts by specific word on title
- Query with a meta value inside a given range
- Changing WP_Query params with url Query Var
- Store sticky post’s ids in a transient
- How to build a WP_Query using mulitple tags and using AND or OR operator between them
- Multiple loops without repeating content
- Custom Query num_rows returns wrong amount
- Use more than one query, but prevent duplicates – at scale!
- Fetch Record based on meta key dates
- Is it a good idea to improve meta query performance by adding tax query?
- add active class based on permalink and url
- Bypass “supress_filters” in WP Query
- Should wp_query automatic meta and term cache priming be used in an enviroment with an object caching
- Filtering out child category posts from parent category archive not working
- Display custom tags on pages that have a specific page parent
- use of 10 new WP_Query : loading too slow (with url) [closed]
- How to query for all posts that have a particular meta key?
- Advanced WP Query and/or
- Exclude All Posts Which Do Not Have A Tag Assigned
- How can I override one post and make it display content for another post?
- Get all posts which was posted on X Days WordPress
- How to create custom query by keyword in post title?
- Conditional operator OR not working with custom fields
- complex get_posts() query to select child pages
- Get posts that do not have the same tags as current
- Should I reset $wp_query?
- Posts query according to meta box date
- How can I comment comma-separated array values?
- How to use ‘WP_Query’ or ‘query_posts’ to display content in a descending order
- how to load posts to a custom post template after using template_redirect or template_include
- 2 queries with counters
- Max Posts and Memory Limit
- How to avoid filling up an array each time I run a WP_query?
- Multiple Query_Posts
- How to query for a page, get data, then query for child pages of that page
- Which is from this queries is more faster
- Magazine style frontpage with multiple categories/loops and no duplicate posts
- Query post and sort by custom value calculated with custom field on cpt
- Query post ordered by meta value that show first post that contained a tag
- query hook parse_tax_query function takes no effect
- Duplice post with standard WP loop – fixed by using query_posts() instead
- ElasticPress is (aparently) messing with my search filters
- pre_user_query vs pre_get_posts
- Order by meta date with a thousanth of a second defaults to post order
- Custom query for custom post type not getting correct post ID
- Problem with my loops
- Showing the correct number of posts_per_page when avoiding the use of post__not_in
- My entry results are not consistently alphabetized
- Merge two queries and remove duplicate
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- Seach and categories not working when ignoring sticky posts in main loop
- posts_per_page increment additional post
- Calling body_class and wp_nav_menu for a different post
- Modify query to exclude certain ids and certain parents and its corresponding children
- How to order by datediff in WP loop?
- how to exclude store in clipper theme wordpress code php
- Display post list within category list sorted by name [duplicate]
- Optimising amount of calls to custom fields
- When should you use WP_Query vs query_posts() vs get_posts()?
- Post OrderBy slow performance
- How to query post ids liked by the Author
- get contents and permalink from a specified page
- Help in query for list links
- WordPress pagination returns the same posts
- Incorrect posts displayed on category page
- WordPress WP_Query Search (‘s’) With Multiple Search Terms
- Prevent URL Parameter Affecting other WP Query