The rewrite-rules tag has no wiki summary.
0
votes
1answer
57 views
Virtual Page with Registration form
Working on a plugin, which is intended to provide a registration on front-end, to let users register.
I am trying to create a Virtual page, which would display the form.
Trying to create URL like ...
1
vote
1answer
178 views
Make post slug have priority over category slug
I have a wordpress site where the category base is stripped from the url.
Now, when a category has a certain slug that's similar to a post slug, the category is shown.
I would like to show the post ...
2
votes
1answer
76 views
Rewriting URLs in Wordpress
I am trying to solve a rewrite problem but don't fully understand how to read the below code.
I believe the event/industry/(.+)/?$' is stating the format I want in my new url after rewritten, which ...
1
vote
1answer
140 views
ReWriteRules and WordPress Multi-Sites with Sub Directories
I'm having a diffucult time getting the ReWriteRules and URL structures setup for a Wordpress 3.4.2 (latest version as of this post) blog with multi-site enabled.
www.ourdomain.com/ is the homepage ...
0
votes
2answers
102 views
How do I make WordPress revise an .htaccess file a certain way?
I've learned just a slight bit with WordPress Rewrite API -- just enough to add another rewrite rule for a plugin. The plugin works if installed in the root, but I'm finding that if one installs ...
0
votes
1answer
91 views
Tricky URL rewrite with custom values in url
We have custom post type as user_images and each of these post has a image attached with image name is 3 digit number followed by extension.
When the url
http://mysite.com/wp_username/3digitnumber
...
4
votes
0answers
117 views
Permalinks so that one custom post type appears to be a child of another, not working
Currently I have two post types, "products" and "products-data" they are separate post types; however, for all intents and purposes products-data is a child post of products. The relation is ...
1
vote
1answer
72 views
How to Create a Custom Slug for Tags and Categories with a prefix or suffix?
I wanted to rename the slug to use a custom rewrite with a prefix or suffix that I choose. For example, if the tag name is "product" I want to use a rewrite with a slug that says ...
0
votes
1answer
132 views
Custom url structure - pages under a custom post type
I'm struggling with the structure of my Wordpress site and I was hoping you might be able to give me some advice.
The site is for a series of events and the structure is as follows:
Gateway ...
9
votes
1answer
476 views
When should add_rewrite_tag() be used?
I've spent a few days trying to learn how to best add rewrite rules. So far my understanding is that a suitable way to add simple rules is to use add_rewrite_rules(), with large thanks to Jan Fabry on ...
0
votes
1answer
98 views
Custom post rewrite rule not working
I'm adding a custom post type like so (names have been altered to protect the innocent):
add_action('init', 'my_post_types');
function my_post_types() {
register_post_type('publication',
...
1
vote
0answers
77 views
404 (category, pages, archives) when using custom rewrite rules
I'm using www.domain.com/%POSTNAME%/CAR permalink structure (CAR is the variable i need to extract.
After adding the code to the functions.php the other wordpress url's stopped working (category, ...
1
vote
1answer
94 views
Custom rewrite rule is not picked by Wordpress
I am trying to create a custom Rewrite URL something like
function add_my_rule() {
global $wp;
$wp->add_query_var('state');
$wp->add_query_var('state_destination');
...
1
vote
0answers
86 views
URL Rewrite with Custom Variables
I right now have a custom post type with a url structure like:
example.com/videos/taxonomyname/
I have a custom variable that I am detecting in the template file to switch layout views which works ...
0
votes
1answer
198 views
.htaccess rewrite
I have created a custom post type called 'event' and added an event called London 2012. I want the following URL structure for a page:
local.mysite.com/london-2012/speakers
I have created a page ...
1
vote
1answer
284 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 ...
1
vote
1answer
135 views
Re-write specific custom post type category URL to go to another page
I know this general question has been asked before (like here and here), but the problem is with my limited experience, I cannot get the results I need looking at other people's code.
So here's my ...
1
vote
1answer
141 views
How does WP handle multiple matching rewrite rules?
Here is my url to a custom type :
http://host/movie/my-slug
When I go to this link, I'm redirected to
http://host/movie/my-slug/?post_type=movie
which results in a 404 error.
I use Rewrite ...
1
vote
2answers
524 views
How to modify URL structures in custom post types and taxonomies or terms
I am well aware that there are several posts covering the topic of customizing the permalink URL structure of custom post types, custom taxonomies, and taxonomy terms. However, none of them are real ...
0
votes
1answer
92 views
Rename page URL
I have the following URL structure:
http://localhost/wordpress/gallery?id=331
id specifies the id of the post.
gallery is a normal page inside which I am accessing the id of the post and fetching ...
1
vote
1answer
59 views
How to debug removal of rewrite rule flushing?
I use Custom Post Types. I try this:
functions.php
add_action( 'admin_init', 'flush_rewrite_rules' );
Now I’d like to remove this again. I try this:
remove_action( 'admin_init', ...
0
votes
1answer
99 views
Subpages Permalinks Issues
my site looks like:
Page-1 (page.php)
... Subpage-1 (custom-collection.php; Custom Post Type)
...... Filtering Output-Post (custom-collection-single.php)
When I open the filtering output-post by ...
0
votes
1answer
40 views
Rewrite rules applied differently after upgrade
After WP upgrade from 3.2.1 to 3.4.1 I faced the problem that rules are not applied same way.
I have the following rule:
(questions-answers)/([mind|nutrition|fitness|beauty]*)[/page/]*(\d*)$
In WP ...
0
votes
1answer
83 views
Rewrite rule to redirect to a particular filename.php
I'm using the Monkeyman Rewrite Analyzer plugin (http://wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/) I want to write a rule that will be take a URL (that is specified in the user's accnt ...
1
vote
1answer
225 views
Disable wordpress pagination URL rewrite for specific page
I'm hoping somebody could help me out with the following issue. I have a wordpress page: http://www.howdesign.com/design-jobs and there is a list of jobs coming from behance.net via JavaScript. When ...
0
votes
1answer
316 views
Multiple parameters in a custom post type url rewrite
I have a custom post type called venues currently they display through the url format:
http://mywebsite.com/venue/{venue-name}
I would like to have the format:
...
1
vote
1answer
103 views
Force a specific template based on the URL
When a user browses to a URI beginning with "/forums", WordPress should call a specified template. For example, all of these URLs:
mysite.com/forums
mysite.com/forums/questions
...
1
vote
0answers
27 views
Permalinks only for posts
I would like to use wordpress permalinks but only for posts. Is there any way to do that?
I don't care about seo, my website is about niche subject so it already has first position in google. Also ...
1
vote
1answer
72 views
Rewrite rules for varying nested terms of custom taxonomy
I've searched the net an the only working solution to this seems to be this post by Jeff which does everything except handle nested terms.
Does anybody know how to change the rewrite based on the ...
-1
votes
1answer
110 views
Wordpress custom taxonomy page
I've got a question that I've seen being asked before, but none of the answers solved my problems. It's something I've run into before, but never managed to solve.
I've got a clean Wordpress ...
0
votes
1answer
159 views
Redirect old query string urls to new SEO urls
I had urls like example.com/?area=new-york. area is a custom taxonomy. I had to change the urls to example.com/new-york. I want to do a 301 to new urls if previous urls are accessed. and I want Google ...
1
vote
1answer
270 views
How to achieve this permalink -> category-name/custom-post-type-name/post-name
I am trying to use categories to provide the structure for my site. I will create sections on my site called England, Wales, Scotland and Ireland . These will be categories. My posts will use custom ...
0
votes
2answers
139 views
Default category link for a custom category is a broken link
I'm developing a Multisute plugin that is supposed to setup sites using a specific template, including setting up several static pages and menu items, as well as a "Blog" category for blog posts.
The ...
0
votes
1answer
53 views
Custom Taxonomy in Permalink from post type
I am using custom post types and custom taxonomies for that post type.
This snippet currently sets the permalinks for the post type:
'rewrite' => array('slug' => 'myrewritebase'),
I am ...
1
vote
1answer
157 views
Need to add rewrite rule that adds in additional information about the post to url
A have a post type for venues which have the attributes title, state, and suburb. Currently using the default WordPress permalinks I get the following format:
mysite.com/venue/{title}
However, I ...
0
votes
2answers
107 views
rewrite rule to redirect to the most recent date permalink
I've got an archive that's displayed using a URL on the form www.mysite.ex/mycpt and I need to make a rewrite rule for that URL which redirects to a permalink with the latest date archive, which is on ...
1
vote
0answers
108 views
Move wp-content htacess
I notice that when I rename the wp-content and plugins folders http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content my multisite network htacess still references wp-content: see this ...
1
vote
0answers
179 views
htaccess rewrite conflict with wordpress rules and ssl
this one has me buggered- I have the below htaccess rule to redirect ssl to non-ssl pages. this works fine, except I'd like to exclude certain wordpress requests from this rule- for example, ...
0
votes
4answers
1k views
Wordpress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
I've encountered a strange error while developing a custom theme.
After finishing editing the template for a custom post type single view, I passed onto working at the template files for pages and I ...
0
votes
3answers
156 views
How to access .html file that's located in the theme folder from the browser?
By default you cannot access a file inside the theme folder directly from the browser, what changes should I make to make an exception?
1
vote
1answer
93 views
add_rewrite_rule behaving strangely
I'm customizing another plugin by changing the rewrite rule, from:
add_rewrite_rule('^api/auth/([0-9]+)?/?','index.php?__api=1&uid=$matches[1]','top');
to:
...
2
votes
1answer
67 views
How to get wordpress link to fully evaluate when coming from facebook
The short version:
Any link from Facebook to a page stops evaluating at the "hardcoded page" in the wordpress press install, ignoring the remaining parts of the URL. It doesn't allow the shortcode ...
5
votes
1answer
346 views
Rewrite Rule for Multilingual Website, Like qTranslate?
I would like to write my own little plugin for language switching. For that, the very first thing would be to get the rewrite rules running. I have been looking around the web for 2 hours, but I ...
1
vote
1answer
244 views
Rewrite rule for a query string
I have a taxonomy search form and the link output is
http://localhost/wp/?cityid=16
But i want it to be rewrited as
http://localhost/wp/cityid/16
.htaccess
# BEGIN WordPress
<IfModule ...
1
vote
0answers
71 views
Getting 404 error on my wp rewrite error
The code I'm using to rewrite urls with query vars:
function add_query_vars($aVars) {
$aVars[] = "city";
$aVars[] = "address";
$aVars[] = "pg";
return $aVars;
}
// hook add_query_vars ...
0
votes
1answer
179 views
rewrite rules hierarchical
I want that my wordpres follow this rules:
/productes/ a page with all productes
/productes/[category]/ a taxonomy-page with all productes of the category
/productes/[category]/[subcategory]/ a ...
1
vote
0answers
85 views
Evaluating a external rewrite rule before internal wordpress rewrite rule
I am been plucking out my hairs since last few days trying to solve this problem:
I want to convert my urls from format
http://example.com/prodsearch/category/tag1-tag2-tag3-tag4
to
...
1
vote
1answer
199 views
remove_query_arg() on rewrite rule
I'm attempting to add a Back to Search Results link which in essence will simply link back to the starting search page - for example /?s=test. I've taken a look at the global query vars and do see ...
1
vote
1answer
75 views
Different rewrite rules for taxonomies and cp in multisite?
I´m making a multilingual site with multisite and I`m wondering if you can specify different rewrite rules for taxonomies and custom posts for the different sites, that are using the same theme. Maybe ...
1
vote
0answers
406 views
How to change “attachment_id” in attachment permarlink?
I changed attachment permalink by add_filter('attachment_link','my_media_url');
from
http://domain.com/?attachment_id=123
to:
http://domain.com/?media=123
The change is successful. But, with the ...