You can get same result by outputting values from PHP array. Since it is multicolumn array, you will need to run foreach
loop and get values of each child item.
Mostly it’s standard PHP stuff, nothing special. Although earlier you did not need to supply post ID in each WordPress function since you were using it inside a loop, but now you will have to do that.
So here is the output.
foreach( $getAllTimeRows as $getAllTimeRow ) {
$post_id_num = $getAllTimeRow->post_id;
echo '<a class="popularPostLinks" href="' . get_permalink( $post_id_num ) . '" rel="external" target="_blank">' . get_the_post_thumbnail( $post_id_num ) . '<br>
<div>
<p>' . get_the_title( $post_id_num ) . '</p>
</div>
</a>';
}
Related Posts:
- How to display custom field on homepage
- Exclude posts with specific metadata from search?
- Delete post meta by serialized meta value
- How do I use WP_query with multiple post IDs?
- Cleaning up WordPress to improve performance?
- Include a external PHP file into a WordPress Custom Template
- List of all theme customizer control types?
- Inject post (from specific category) between posts in Loop
- Show the most popular post per week
- Add a class to links in the visual editor (how to get old dialog back)
- is_page() not working from within a plugin
- Remove option to allow trackbacks/pingbacks from post page options
- Creating custom Woocommerce attribute taxonomies from a plugin
- Load post content into iframe
- wp_customize_image_control default value
- Passing JSON data from WP Query into AJAX causing NULL errors
- Search and Replace in database: How to replace data in SQL dump file on Windows?
- Display certain amount of posts on taxonomy archive page
- How to add 2 posts under another post? Formatting should be intact
- Overriding a theme redux file in child theme
- Widgets not showing in my custom theme
- Count number of published posts by type
- Can an array be used as a meta_query value?
- Can’t increase posts_per_page by variable
- Get taxonomy terms only of the WP_Query current posts
- How to get 2 or multiple custom post types in wordpress functions.php
- Use WP_Query in shortcode
- Creating bulk posts with Youtube videos
- Why is variable not working on custom sql query using wpdb?
- How to do multiple searches (with logical OR) in WP_Query in hook pre_get_posts?
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- get current custom post ID by WP_Query method
- How to securely provide a $_POST var in WP_Query with PHP 7?
- Create WP_Query to search for posts by their categories or their parent/child categories
- If Query In Sidebar
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Dynamic content based on a URL parameter
- How to add a do_action on refreshing of WP customizer?
- Weird 404 URL Problem – domain name being placed at end of urls
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- Replace shortcode in substring
- How to get all author posts outside of author templates
- How to obtain the current website URL in my theme?
- How to get post ID in a Page?
- Hook called before text widget save
- Echo title attribute php
- str_replace with the_content is not working
- How to override url params with rewrite rules vars?
- How to display SQL query that ran in WC_Order_Query?
- Store metakey value as an array
- Post not populating for custom post type based on category selection
- Infinite Loop – WP_Query
- List of Events with Multiple Dates: Only NEXT Date
- Toolbar Hidden in a Virtual Page
- WordPress SQL JOIN query
- Editor capabilities – admin_init
- WP_Query and help with the loop for magazine front page
- How to WP_Query posts order by parent title?
- search.php to search only the post title
- WP_Query – How to query all of post types categories
- How to work Woocommerce pagination inside shortcode?
- get different meta-data of a complicated query at the same time
- Hide A Class and Add Custom HTML Code Using WordPress
- wp_Query with mutuplea values returns all posts
- How to get specific multiple pages excerpts at homepage?
- Use WPQuery to match to specific repeater row in post
- WP_QUERY post_in problem
- how to get data from two different table from wordpress database
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Assign meta_query value to php variable
- Dynamic “home” image and URL based on current folder
- WordPress search query, how to modify the sql
- Noob question: want to remove the “site identity” logo for specific part of website only
- Modify post image in full size
- Wp-query output correct, but the loop shows one less item (only sometimes)
- Autoloading Classes in Plugins
- Automatically refresh page if widget is added to page?
- Making list of posts with chosen description
- Ordering / grouping posts by datepicker ACF
- Include search tags and users in my search results system
- Add custom taxonomy to custom search for posts
- How to add text before posts
- Show content by using tags
- My query keeps looping infinitely ! how to stop it?
- How to add thumbnails from recent posts to owl-carousel in wordpress automatically?
- Only Get A Certain Number of Posts From WP_Query
- Querying posts based off a jquery datepicker
- Best way to define a database with product codes and back-end support?
- List sibling pages widget, exclude current page
- wp_customize_image_control default value
- How to add button to top of theme customizer?
- How can I add more code to this?
- Edit the Publish Widget Options
- Does wp_query and query_posts affect website performance? [duplicate]
- WordPress post pagination on custom template not working
- Ajax Load More or View More functionality for woocommerce category layout by template overriding
- New to WordPress & Freelancing [closed]
- Add multiple HTML attributes to an Elementor button
- How to sort custom sortable column by custom table value
- /page/2/ redirect to 404