region selection
Just a quick thought: Append your link/URL a query arg with add_query_arg. Then extract it on load and reroute using exit( wp_redirect( home_url( ‘/etc’ ) ); or whatever fits you best.
Just a quick thought: Append your link/URL a query arg with add_query_arg. Then extract it on load and reroute using exit( wp_redirect( home_url( ‘/etc’ ) ); or whatever fits you best.
You could achieve that by adding a rewrite endpoint via add_rewrite_endpoint. This post from a WordPress developer has a good explanation of how they work.
You should have the $post variable (you may need global $post;) from which you can get the post ID ($post->ID). Then $perm = get_permalink( $post->ID ); should give you what you want. https://codex.wordpress.org/Function_Reference/get_permalink
Pages work this way, so you could either use pages or create a new post type (you’d need the hierarchical => true: function codex_custom_init() { $labels = array( ‘name’ => _x(‘Books’, ‘post type general name’, ‘your_text_domain’), ‘singular_name’ => _x(‘Book’, ‘post type singular name’, ‘your_text_domain’), ‘add_new’ => _x(‘Add New’, ‘book’, ‘your_text_domain’), ‘add_new_item’ => __(‘Add New Book’, … Read more
The first problem can be solved by changing the query_posts in your work section. Replace ‘&category_name=work’ with ‘&category_name=work&paged=1&posts_per_page=-1’ For the second problem, why not use the category template itself in place of index.php? As a side note, you should not use query_posts for this use case. In place of that you should use a new … Read more
If I understand what you are doing… If you have categories set to load at “/category-name/” and a category named “/movies/” and a custom post type set to load at “/movies/” you’ve got conflicting elements. The rewrite rules are competing. That is going to be problematic. If you set has_archive to false when you register … Read more
You can always try to filter rewrite_urls array and create rules for you custom post type.
In your second code block (single case study), you’re overriding the main query: <?php query_posts( ‘post_type=case-study’ ); ?> Get rid of it!
Pass a third argument true to both previous/next_post_link() (see codex)
From the comments: What are your settings under Dashboard -> Settings -> Reading. Specifically, what are your Front Page Displays, front page, and posts page settings? And your reply: exactly this is the point, the client has used a Theme called Choice and in the Theme Frontpage Settings there is this page selected :”Welcome to … Read more