How to get next and previous post links, alphabetically by title, across post types, in a shortcode

I need next and previous post links in a single post page using a “page-builder” type of CMS—specifically the DIVI theme by Elegant Themes. So, I need the links to be able to appear using Shortcodes, as the controls in the template, along with a lot of the default template stuff, are hidden when you … Read more

How can I add title attributes to next and previous post link functions?

For some reason a title attribute is not appended to next_post_link and prev_post_link calls in WordPress. How can I add one? 5 s 5 Update As I deleted the Repo on GitHub, here’s a new answer. add_filter( ‘previous_post_link”https://wordpress.stackexchange.com/questions/13044/,”wpse13044_adjacent_post_link_tooltip’, 10, 2 ); add_filter( ‘next_post_link”https://wordpress.stackexchange.com/questions/13044/,”wpse13044_adjacent_post_link_tooltip’, 10, 2 ); function wpse13044_adjacent_post_link_tooltip( $format, $link ) { $previous=”previous_post_link” === current_filter(); … Read more

Filter next_post_link() and previous_post_link() by meta_key?

I have a page with two sections, each uses a different WP_Query() to pull in events, which are a custom post type. Each WP_Query() queries a meta_key for the event date so that Section 1 only displays upcoming events and Section 2 displays past events. The upcoming events in Section 1 display all relevant information … Read more

Get Previous & Next posts by Post ID

How can I go about getting the previous and next posts from outside the loop? Everything I try to do aside from the custom SELECT query (using get_posts or WP_Query) breaks stuff further down the page. I currently have a recursive function which will hopefully find the first “previous” post which satisfies a certain condition. … Read more

is it possible to get next_post_link

I have come across a problem whilst using the next_post_link() function. It seems that this function automatically echo’s, for position reasons I need this to just return the link. Is there any available function or workaround that I can use to achieve this result? 3 s 3 try to work with http://codex.wordpress.org/Function_Reference/get_adjacent_post; example: $next_post_link_url = … Read more