I am using UberMenu and they have been very helpful, but we have not been able to figure this out.
They have a shortcode to display recent post in the menu with image and title.
I want to add the author of the post under the title linked to the authors post.
Here is the current code:
$post_url = get_permalink($post->ID); $author_name = get_the_author_meta('display_name', $post->post_author );
$html.= '<li>'. $image. '<div class="wpmega-postlist-title"> <a href="'.$post_url.'">'.$post->post_title.'</a></br> <a href="'.esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ).'">'.$author_name.'</a> </div>';
If you mouse over the sports menu tab and mouseover the author name while on the home page you will see it links correctly, but if you click into any other page if removes the author fro the URL.