Pagination posts. Url format

Your rewrite rule format is not correct. The $rewrite argument must point to index.php with query vars set so WordPress can create the default query: add_action( ‘init’, ‘wpa103850_init’ ); function wpa103850_init() { add_rewrite_rule( ‘^([^/]+)([0-9]{1,2}).htm$’, ‘index.php?name=$matches[1]&page=$matches[2]’, ‘top’ ); } However, this will still not work correctly, due to the canonical redirect. WordPress wants to enforce a … Read more

Variables posting twice

The parse_query action gets called on every query (menu items, sidebar recent posts widgets, etc.), but get_query_var pulls from the main query, so that condition will be true for all queries despite the fact that the query var doesn’t exist in those queries. You need to check the query object passed to your function hooked … Read more

How can I change the look of a post as is displayed

In TwentyTwelve index.php: <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( ‘content’, get_post_format() ); ?> <?php endwhile; ?> the line in the middle is loading the content.php to show the posts on the homepage. a. In content.php, the_post_thumbnail() in line 18 is responsible for the image, specifically the Featured Image, of a post. … Read more

Non page link in wp_list_pages

I don’t know what you mean by “open a second navigation”. That could mean several things. But to get an “empty” link you have a couple of choices: Option #1– aka, easy but kind-of a hack Add a menu item with the “Custom Links” form. You have to provide an URL but you can delete … Read more

Difference in Get Variable Location

There is no “normal” way (either is commonplace), but it all comes down to your permalink structure, and whether that has a trailing slash or not. As for your login page, it all depends on how you’re generating the URLs, but I would suggest using user_trailingslashit( $basepath_without_query ). As the name suggests, it will apply … Read more