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
- Hide post if matches current month and year
- Displaying theme options in css
- Get the last month with posts using a recursive function…
- Use WP_Query in shortcode
- Creating bulk posts with Youtube videos
- have_posts() execution failure
- Random Default Avatar Function
- How to filter posts by post format “standard” from wp-json api?
- 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?
- Hide wordpress field if data is empty in post!
- Can’t search posts using WP_QUERY inside AJAX Function
- How to query for pages/post depending on slug?
- How can I use wp_query to show all product data using just the products ID?
- Change the site tagline (or similar) based on current page
- Get Current User Id Inside a Loop Returns 0 For a Shortcode
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- Setting custom canonical urls
- Random order of WP_Query results with highest meta value
- Custom page archive query by url var calling page twice on one of my custom queries?
- WordPress custom slug (endpoint) and compare all links
- Only show search results with if current date is between two dates?
- database interactions using OOP
- Customizer: Output default value in Customizer CSS
- How to add just one specific page to widget without plugin?
- Remove one value in dismissed_wp_pointers?
- create a select input with menus created on a custom options page
- Taxonomy linked to pages
- How to query for posts with a null or blank post_name?
- WordPress pagination not working with search page
- get current custom post ID by WP_Query method
- How to securely provide a $_POST var in WP_Query with PHP 7?
- Using foreach loop breaks
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Accessing data from a non-WP database/table within a page content
- Create WP_Query to search for posts by their categories or their parent/child categories
- WP Query with custom Shortcode
- WordPress blog post url on category page
- wp_query with cat not working
- Changing layout with wp_customise
- WP dynamic featured image – Can’t get second featured image url
- Advanced Meta Query for Large Calendar Website (12k+ posts) (175k+ wp_postmeta rows)
- Converting HTML Template to WordPress Theme
- Extending the WP_Widget_Text class
- How to use an associative array in post__in with WP_Query?
- If Query In Sidebar
- Recent Posts slider, using WP_Query(), loads duplicate sliders
- Selectbox in admin panel function linking to CSS
- Compare post-IDs within WP_Query? (Less than / Greater than)
- Can I install/embed WordPress on a ‘single page’?
- Fastest way to get the comment and ping total count for a post
- How to use $query->set with post__in?
- Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?
- How to check if a meta value has already been assigned to any user?
- How to hide products that do not have an image from a slider carousel for an ecommerce webpage?
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- filter default query to show just selected level of child pages in wordpress
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Loading the same WP_Query in two different wordpress .php templates
- How to prevent WP_Query function from returning all posts when empty?
- Dynamic content based on a URL parameter
- Display a specific category of products in shop page and disable code for specific actions
- Trying to build simple deposit code that hooks into woocommerce
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- How to pick the default selected value in wordpress dropdown?
- Add New User, extra fields which are required?
- Add more button if more 8 items
- How to store post ID’s in cookie or session to display the same posts later
- user_profile_update_errors hook not executing
- Send an email to specific adress when button is clicked?
- Customizer: active_callback and sanitize_callback incompatibility?
- Saving and Restoring a Canvas on A Individual User Basis
- Redirect specific user role to specific site after login?
- Send multiple attachments with wp_mail in PHP
- WordPress admin pointers tour bug?
- WordPress, AJAX and pre_get_posts using conditional tags
- Get users that likes the post
- custom url rewrite for wordpress
- Extend plugin Class through functions.php
- How to add a do_action on refreshing of WP customizer?
- get_posts() and WP_query limits ‘AND’ conditions to a maximum of 6 for meta value queries in WordPress
- Exclude posts based on meta value
- Customize position of social icons in upme plugin [closed]
- Weird 404 URL Problem – domain name being placed at end of urls
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- How to get the value of input hidden html from text editor to custom page template?
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- Menu jumping when calling it via PHP
- Custom query, checking values of multiple meta keys
- Output Video Download Link in template
- Modify custom field input data before creating a new post
- auto-populating custom nav with all items from custom post type
- Output custom field value to post string
- inserting a post from an extern php file but post content doesn’t show on wp site
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- Media Upload , file name changed automatically