Hot answers tagged

1 vote
Accepted

Automatically add images to a menu

I guess you need this function get_the_post_thumbnail_url($menu->object_id); (provided menu item is not a custom link) $menu->ID is not the id of the post/page it is linking to. About calling ...
user avatar
  • 473
1 vote

The next_posts_link() works only with original $wp_query

I ran into the same issue. I have nested loops, so in the inner loop I am using $wp_query = new WP_Query($args); instead of the global WP_Query. The solution I used was to explicitely pass ...
user avatar
  • 121

Only top scored, non community-wiki answers of a minimum length are eligible