previous/next_post_link in the same sub-category?

If you’ll take a look at next_post_link Codex page, you’ll see it’s usage: <?php next_post_link( $format, $link, $in_same_term = false, $excluded_terms=””, $taxonomy = ‘category’ ); As you can see, third param is in_same_term and it’s default value is false. If you set it to true, then the function will return next post from same category. … Read more

Display a post map on a blank/new page

After some more Googling… New single.php looks like this: <?php get_header(); global $wp_query; if ( ! isset( $wp_query->query_vars[‘map’] ) ) { if (have_posts()) : while (have_posts()) : the_post(); the_title(); the_content(); endwhile; endif; ?> <p><a href=”https://wordpress.stackexchange.com/questions/31442/<?php echo get_permalink(); ?>?map=yes”>Map</a></p> <?php } else { ?> <div id=”map-canvas”></div> <?php } get_footer(); And functions.php like this: add_filter(‘query_vars’, ‘parameter_queryvars’ ); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)