How Do I get the author’s page id?

It sounds like you need get_author_posts_url() which “Gets the URL of the author page for the author with a given ID.” If you have set the custom permalink correctly it should work. If you really are looking for actual page IDs, there is no page ID for an author archive page. Those pages are dynamically … Read more

Create a page that can be used for different URLs

First, create a single states page. Add a query var to hold the state value, wpd_state: function wpd_query_vars( $qvars ) { $qvars[] = ‘wpd_state’; return $qvars; } add_filter( ‘query_vars’, ‘wpd_query_vars’ , 10, 1 ); Add a rewrite rule to capture the state from the URL, set the wpd_state query var, and load the page states: … Read more

website with pretty permalinks except pagination

WP permalink handling is sort of layered. They underlying “ugly” permalinks capture the actual logic of the system and the “pretty” permalinks are just cosmetic enhancement on top of it. Even when pretty permalinks are enabled, the original ugly permalinks still continue to work. But under normal circumstances they get redirected to a pretty version. … Read more

Removing “www” from a site URL

If you want to change your WordPress Address (URL) one option is to make use of this tool: http://interconnectit.com/products/search-and-replace-for-wordpress-databases/ Just download it, upload it to your server, extract its files and access it via your browser. Example: Suppose your WordPress Address (URL) and your Site Address (URL) are “http://www.example.com” (without quotes obviously). So if you … Read more

show ALL latest posts with archive.php on example.com/latest

All internal rules must point to index.php. This isn’t your theme’s index.php file, this is the main core WordPress bootstrap file. Rewrite rules set query vars, query vars get parsed into queries, those queries have template files associated with them depending on type. Internal rewrite rules never point directly to theme files. If you want … Read more