how to change the permalink to a specific location?

echo get_permalink(123); instead of the_permalink(), provided you know the ID of the “specific page”. the_permalink() will always link to the current post in the Loop, and somewhat nonsensically does not take an ID parameter the way that get_permalink() does. Reference: https://codex.wordpress.org/Function_Reference/get_permalink

custom single.php post showing up twice

Thanks for the help again 🙂 Love this place! The issues was on the single.php page. I have this if statement: <?php $post = $wp_query->post; if ( in_category(‘latest-news’) ) { include(TEMPLATEPATH . ‘/single-latest-news.php’); } elseif ( in_category(‘latest-sermons’) ) { include(TEMPLATEPATH . ‘/single-latest-sermons.php’); } elseif ( in_category(‘sunday-service’) ) { include(TEMPLATEPATH . ‘/single-sunday-service.php’); } elseif ( in_category(‘events’) … Read more

Get current user array with post string

Your code has a lot of errors. For example, inside you should define the global $current_user, not outside. Other error, you use $query_vals variable outside the function where that variable is not defined. Anyway, I would use the function wp_get_current_user() which have not to be called before init action hook. For example, if you are … Read more

Display selected category on post page

I personally like to take all the categories a post is attached to and slap an active class onto them. Here’s the code I found and currently use. /** Active Category **/ // Single Posts only function singlePostActiveCat ($CatText) { global $post; if (is_singular()) { $categories = wp_get_post_categories($post->ID); foreach ($categories as $category_id) { $category = … Read more

Posts Not Paginating

I am copying a clients site over, so I have exported and reinported the posts etc, and the theme into their new site. Unfortunately the problem being that this is not my theme, im copying it over for a client and its displaying correctly on their old site on a lower version of wordpress For … Read more