Refers to the process whereby an URL is manipulated to create what in WordPress is called a "pretty permalink"

learn more… | top users | synonyms (1)

26
votes
1answer
8k views

A tool to analyze rewrite rules? [closed]

Is there a good tool to analyze my rewrite rules? I always get confused with the regexes and the parameter replacements. I have created something myself and will post it here so others can use it, ...
25
votes
1answer
22k views

Need help with add_rewrite_rule

SOLUTION I've gone with Update 3 and have got it working. What I had misunderstood, was that I believed that a rewrite rule would change designers/?designer=some-designer&bid=9 to ...
1
vote
1answer
3k views

How to Rewrite Wordpress URL for a Plugin

I am trying to build a Wordpress plugin here with a custom user admin area. What I would like to do is when the user adds /edit at the end of the page, it should open a page from my plugin. So for ...
9
votes
1answer
1k views

Using the Rewrite API to Construct a RESTful URL

I'm trying to generate rewrite rules for a RESTful API. I just want to see if there is a better way to make this work than having to write out every possible rewrite combination. Ok so I have 4 ...
14
votes
2answers
9k views

Mixing custom post type and taxonomy rewrite structures?

Basically I want to achieve a glossary using custom post types and have some issues setting up rewrites the way I want them to be. I want it like that: The main glossary URL: ...
18
votes
8answers
14k views

How do you create a “virtual” page in WordPress

I'm trying to create a custom API endpoint in WordPress, and I need to redirect requests to a virtual page in the root of WordPress to an actual page that ships with my plug-in. So basically, all ...
2
votes
5answers
7k views

Change the Author Slug from Username to Nickname

Hi to the community, is it possible to change the default username slug to nickname if is available? By default the url is something like: http://domain.tld/author/(admin) , is it possible to ...
7
votes
1answer
12k views

Passing and retrieving query vars in wordpress

I have two authors pages, one displays about 5 posts. Then I'm trying to setup another page that will be all of their posts. I have created a template called moreauthorposts.php and I'm trying to ...
4
votes
3answers
15k views

How to redirect/rewrite all /wp-login requests

Is there any simple way to have wordpress, php or apache rewrite all urls which involve /wp-admin to /admin? I have added this entry to my .htaccess file: RewriteRule ^admin /wp-login.php [L] ...
5
votes
1answer
10k views

Rewriting a custom-post-type permalink with taxonomy term?

I'm trying to rewrite my url for a custom_post_type named wr_events with one of its custom_taxonomy terms from event_type add_action('init', 'wr_events'); function wr_events() { ...
5
votes
2answers
4k views

Change the “page” slug in pagination

Simple question. When pagination is activated, the URL changes to "site.com/page/2". For my site, this should be "site.com/paggetto/2". How can I change that rewrite rule? I also want to change ...
7
votes
1answer
297 views

Two (or more) parallel (sub-)TLDs that are retained when surfing the site / dynamically set the site address?

I am running a site for a German NGO under the domain sub.example.org. Recently, I added sub.example.ch for its Swiss spin-off. Both (sub-)domains are pointing to the same physical location, a WP ...
2
votes
2answers
7k views

Using $_GET variables in the URL?

I need to generate a simple error message on a page by passing a variable through the URL. The URL is structured as follows: http://site.com/parent-category/category/?error=pause I'm sure it's the ...
0
votes
3answers
6k views

Mapping multiple URLs to same page

I just came across this page with almost similar requirements as mine Multiple endpoints to same page i have to achieve same functionality but i also want to pass some parameters to the page where ...
3
votes
2answers
4k views

Making a plugin file accessible via url rewrite?

In my WordPress plugin I have a php file that generates some stats about the blog and outputs it as a simple text file. To access WordPress functions I've included this at the top of the file: ...
4
votes
2answers
2k views

Filtering categories in the permalink structure

Using /%category%/%postname%/ for the permalink I get a URL string of all the categories that the specific post is included in. I would like the categories in the url to be filtered down to only one ...
3
votes
1answer
2k views

Pretty URL with add_query_var

I'm trying to add a 'sub post' to each post on my site, eg site.com/product-one/changelog site.com/product-two/changelog site.com/product-three/changelog This is the code I'm using atm, which I ...
3
votes
1answer
4k views

How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy

This answer provides the code for a query that returns an OR match on a taxonomy term: global $query_string; $args['tax_query'] = array( array( 'taxonomy' => 'status' ,'terms' ...
3
votes
2answers
457 views

How to use Post Custom Metadata in Post Titles and Post Permalinks

I am very new to WordPress. How can I use post custom metadata in place of Post Titles, and as the Post Permalink? For example, instead of domain.com/the-post-title, the permalink would be ...
0
votes
1answer
4k views

custom htaccess rewrite rule for page

i have a page in wordpress called "video". its page id is 6, and its slug is "video" in my theme ive set it up to show content based on GET variables here is the URL rewrite im trying to set up: ...
5
votes
1answer
3k views

Change Author Base Slug for different Roles

is it possible to change the author base slug in dependency of the role? For example, authors get example.com/ninja/%username% and subscribers get example.com/trainee/%username% ? I am thinking of ...
11
votes
1answer
14k views

How to create custom URL routes?

I have a very peculiar requirement, hopefully I can explain it without being too confusing. I created a page template where I list some properties I get from an external XML file, so far no problems, ...
6
votes
3answers
4k views

Add .html (dot HTML) extension to custom post types

Is there any way to add the .html extension to custom post types without plugin ? For posts I can use /%postname.html on the permalink settings For pages I can use: add_action('init', ...
3
votes
2answers
2k views

Custom post type taxonomies URL rewrite

What I want to achieve is an online listing catalog with a URL like this: www.example.com/drawing-tools/brand/type/material/color/ In this example, I have a custom post type named "drawing-tools" ...
2
votes
2answers
2k views

Rewrite Rules for Multiple (more than 2) Taxonomies

I am using woocommerce and have some 'product attributes' which are just a taxonomies. I have the following taxonomies: pa_color pa_material pa_style the pa_ stands for product attribute and it ...
1
vote
4answers
933 views

Adding %author% in custom post type URL structure?

I'm trying to do some WordPress URL rewriting ... Specifically I have custom post type that currently works like this: http://mydomain.com/videos/post-title/ But I would like to have it located at: ...
1
vote
1answer
959 views

Wordpress returns 404 on custom rewrite rule conflict in parameters

I have been following the steps on the answer here and it worked wonders. But my problem is on this part, on the original: add_filter('rewrite_rules_array', 'mmp_rewrite_rules'); function ...
1
vote
1answer
986 views

How to have a custom URL structure for a custom post type?

Even though this question sounds like others here is my problem: The site I am updating had a permalink structure of /%postname%, during this time I created a custom post type of "popups" (rewrite ...
1
vote
1answer
1k views

Author url rewrite

The default author permalink is: http://domain.com/author/{username} How can I do something like this ? http://domain.com/author/{username}/songs http://domain.com/author/{username}/books ...
0
votes
1answer
2k views

Removing base slug from hierarchical custom post type

I have a hierarchical custom post type called "state". My goal is to have a permalink structure like thus: http://website.com/idaho/ http://website.com/idaho/sub-page I'm close but haven't quite ...
2
votes
2answers
2k views

Remove parent slug for child pages

I'm looking for a plugin/custom function that removes the parent slug of a child's page permalink. Something that automatically changes the permalink for child pages. Example: ...
1
vote
2answers
1k views

Rewrite custom post type url's adding meta box values

I've got these custom post types (CPT) and meta boxes: Movies (CPT) Genre (Meta box) Genres (CPT) If one movie is called Die hard then I want the permalink to be: /genres/action/die-hard This ...
9
votes
3answers
4k views

How to create a front end user profile with a friendly permalink

I want to create a public front-end profile page with a friendly url like this format. mysite.com/user/someusername Any idea on how can i achieve this? I know it has something to do with rewrite ...
2
votes
2answers
267 views

Custom pages with plugin

I'm developing some plugin where I would like to enable custom pages. In my case some custom page would contain a form like contact form (not literally). When user will fill out this form and send it, ...
3
votes
2answers
709 views

Custom post types - Use post_id in permalink structure

I'm registering my CPT like so: $args = array( 'labels' => $labels, 'public' => true, 'hierarchical' => false, 'rewrite' => array( 'with_front' => false, ...
3
votes
1answer
11k views

How to rewrite URI of custom post type?

The site that I am working on uses the following "pretty" permalink structure: http://example.com/blog/my-special-post But for a custom post type my client would like to avoid having a "pretty" ...
3
votes
2answers
764 views

Create built-in pages without creating actual pages

For example: site.com/contact (or site.com/?page=contact if not using permalinks) when someone goes to that page I want to load a theme template, like page-contact.php But I don't want to create a ...
2
votes
1answer
3k views

Custom post type permalink endpoint

I have a custom post type called "destinations" and I have set the EP mask for the post type to default EP_PERMALINK. I have added a couple of endpoints as follows : add_filter( 'query_vars', ...
3
votes
1answer
1k views

Custom post types - Use post_id in permalink structure when using has_archive => true

I recently asked this question Custom post types - Use post_id in permalink structure and solved it but as I have enabled 'has_archive' => true the solution given no longer works. Let me explain: ...
3
votes
1answer
2k views

URL rewrite rules for multiple taxonomies query

I'm trying to create some pretty URLs for links querying multiple taxonomies. I'm using the "Taxonomy drill-down" plugin, although the main usage is now integrated @ the core it still has some helpful ...
2
votes
1answer
2k views

Custom Post Type Rewrite Rule for Author & Paging?

I'm using WordPress 3.0.1 and I have made custom post-type called 'dienasgramatas'. My plugin also makes custom rewrite rules for displaying all posts from this post type and even custom permalink ...
0
votes
1answer
2k views

attachment url rewrite

i want to change the address of the file attachment link to wordpress [example: http://www.sitename.com/category/sub-category/article.html/attachment/image etc.]. i did research on the subject ...
3
votes
1answer
233 views

Remove unwanted part of permalink custom structure from CPT url?

My site currently has regular posts (in a section called "Trend Watch"), as well as a Custom Taxonomy (called "Region"). My permalink settings have this Custom Structure: ...
3
votes
4answers
5k views

URL Rewrite + Page + Custom Post Type = Unusual Redirect

Yet another URL rewrite issue :) The Problem I have a URL rewrite rule that should work, but against all logic it redirects without passing the query var. The Juicy Details The site has a page ...
3
votes
5answers
4k views

How to make a category page the blog home page?

I want to use a category page as the home page of my blog. Is that possible and how can I do it? It tried it with a .htacces rewrite rule but that didn't worked.
0
votes
3answers
2k views

Pretty URLs or permalinks for attachments

Theres a way to convert links like: http://www.localhost.lh/?attachment_id=41 into: http://www.localhost.lh/attachment/id or: http://www.localhost.lh/author/attachment/id
5
votes
1answer
2k views

Custom post type yearly/ monthly archive permalinks

I have a custom post type "news" in my Wordpress site. I am using Advanced Custom Fields plugin to add meta data to each post. I want to create an array of news items as an archive: [2013] ...
3
votes
3answers
1k views

Force the Website URL to Include “www” and to be Upper Case?

No matter what url somebody uses to access my site, I'd like it to redirect to www.MyUrl.com. Is this possible?
2
votes
1answer
1k views

Permalink rewrite with custom post type and custom taxonomy

I think thats a quick one: I've got: Custom post type: Food Custom taxonomy (Registered to Food): Fruits Terms in Fruits: Apple, Orange, Cherry If I type in example.com/food?fruits=Apple,Cherry, ...
1
vote
1answer
91 views

Why did installing wordpress in url root jack up underlying WP sites?

I have a server (w2008 with iis7.5) and domain with a lot of different WP installs. All of the following represent WP installations. x.com/stuff x.com/programs/recent ...