Questions tagged [url-rewriting]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
50 views

Removing "www" from a site URL

I need to remove the "www" part of a site's URL. Is it posible to simply go to settings and change both the Wordpress install URL? Or there's more steps involved? I'm a bit wary of changing the ...
Sergi's user avatar
  • 260
0 votes
1 answer
479 views

Change directory url to be same as page permalink?

I have a page with permalink set in the dashboard to www.domain.com/reports that has links to PDF reports located in www.domain.com/wp-content. There is not a reports directory on the server and ...
Don's user avatar
  • 115
0 votes
2 answers
928 views

Dynamically redirect page based on URL?

I'm making a translation system for my website and I'm having troubles with URL rewriting. Each page is translated to multiple languages and should have different URLs for each language, e.g.: /en/...
Victor Marchuk's user avatar
0 votes
1 answer
567 views

Custom Taxonomy specific to a Custom Post type - rewrite URL

I have a custom taxonomy which behaves similar to the post type as a category behaves to a the default posts (on the grounds of /%category%/%postname%/ permalink structure) so that the posts in the ...
Bram Huisman's user avatar
0 votes
1 answer
293 views

website with pretty permalinks except pagination

I use friendly URLs on my wordpress page so I have for example shop/page/2 I would like to have It like shop/?paged=2. Is there anything like rewriterules but opossite to it ;) ? Which converts pretty ...
Mateusz Winnicki's user avatar
0 votes
1 answer
3k views

Why is there /index.php/ in all my links? How do I remove it?

I recently realized that my rss feed is not working, because a plugin was assuming it's under mydomain.com/feed But it isn't. I get an 404 error. I figured out that instead my feed is under ...
evolution's user avatar
  • 121
0 votes
1 answer
61 views

How can I reduce the number of rewrite rules?

I'm building a robust filtering system for my WordPress site, and I really want to have pretty permalinks for the resulting URLs. But because I'm offering a large amount of different filtering options,...
Marc Dingena's user avatar
  • 1,102
0 votes
1 answer
36 views

Create a page that can be used for different URLs

How can I create a page that can be served for different URLs? I'd like to write one page with HTML and JavaScript content, and have the JavaScript decide what content to have on the page. example....
p.campbell's user avatar
0 votes
1 answer
33 views

Custom URLs in post types make it impossible to view archive

I have a custom post type (let's call it "video") and a custom taxonomy (let's call it "section"), I would like both of these to appear in the post URL. The post URL rewriting is working fine. ...
Matt's user avatar
  • 103
0 votes
1 answer
4k views

Rewrite Rule for Custom Page with Query Vars in URL

Background I have a a page called 'listen' with a custom template, which runs a custom wp_query that uses the 'show' variable in the URL. The following example works... example.com/listen/?show=...
Andy Cheeseman's user avatar
0 votes
1 answer
387 views

How Do I get the author's page id?

I need to assign comments a user makes to the author's page where the user is posting the comment. So, I need to get the author's page id. I have already tried functions like: url_to_postid() and ...
Gixty's user avatar
  • 1,097
0 votes
1 answer
44 views

Capturing /page-name/[0-99999] in both template and number

Apologies if this has been answered already - I have singularly failed to word my question in a way that Google can help. I'm trying to create a page that acts as a base URL for a range of items with ...
George Pearce's user avatar
0 votes
2 answers
2k views

How to get page_id for url rewrite or how to use page slug for calling a page?

I would like to simply create an url rewrite that takes the third argument and matches it to its corresponding pages, ignoring the other two arguments. domain.com/argument1/argument2/page-slug = '...
Daniel Klose's user avatar
0 votes
1 answer
2k views

Locked out of admin panel after installing HC Custom WP-Admin URL [closed]

I installed "HC Custom WP-Admin URL" plugin (https://wordpress.org/plugins/hc-custom-wp-admin-url/) on my WordPress installation, and then changed the admin slug value to a cryptic url (http://example....
Najeeb's user avatar
  • 353
0 votes
1 answer
5k views

Adding a query string to only one page url

I would like to add the following to a single page within my wordpress site and NOT all of them. Current page url/permalink mysite.com/pagename/ Would like to mysite.com/pagename/?...
Simon Davies's user avatar
0 votes
1 answer
1k views

Edit Permalink Structure For Custom Post Type or Modify .htaccess?

I've been trying to find a solution for days now and I am absolutely stumped. I am putting together a website to list my domain portfolio for sale and I'm using a plugin I purchased to lists the ...
Cody Hendrix's user avatar
0 votes
1 answer
1k views

How To Run Multiple Multi-Site Networks On Same Box [closed]

I'm building a multi-site project locally using the VVV Vagrant VM. I setup a sub-domain multisite install with domain mapping and two sub-sites. Everything works fine. This was my sandbox that I ...
Ken Prince's user avatar
0 votes
2 answers
3k views

Adding a date archive to Custom Post Type

Having a little problem with URL rewrites. Trying to get the following URL to display all the sermons in 2014 http://example.com/sermons/2014 Currently it is looking for a sermon called 2014 ...
Stewarty's user avatar
  • 312
0 votes
1 answer
2k views

I can't access custom taxonomy page listing

I had an issue with a custom taxonomy and a custom post type using the same URL. My URL I am using for my post type is /news and then I have a taxonomy which I need to have /news/cars I followed ...
asaunders's user avatar
  • 251
0 votes
3 answers
505 views

How to have permalink like domain.com/term/postname?

I'm trying without success to have a URL structure like domain.com/term/postname, but I just get 404 for all non-CPT pages. function add_video_post_type() { $labels = array( 'name' ...
Daniel's user avatar
  • 1,206
0 votes
1 answer
75 views

Re-directing URLs with dates to URLs without dates

When I first started writing entries I decided to include the month and day in the URL's, thinking I might need them. In the end turns out I didn't. I found that I can access a particular entry as ...
MxLDevs's user avatar
  • 125
0 votes
1 answer
4k views

Remove parent page from url

I would like to remove the parent page name from the permalink. At the moment, I have site.com/parent-page/child-page.php and I would like to have something like that site.com/child-page.php
jeremybarbet's user avatar
0 votes
1 answer
275 views

Visiting posts results in 404 errors after host migration

I have migrated my WordPress blog from one host to another by way of transferring the files and exporting/importing my database, updating URL references where needed. On my new host, I can ...
erogol's user avatar
  • 103
0 votes
2 answers
7k views

How to use if($wp_query->query_vars['name'] == 'pagethatdontexist') without getting a 404? How to suppress 404

i want to do something if my url is /pagethatdontexist But I dont want wp sending 404 headers. I tried this: add_action('wp', array($this,'awp')); function awp(){ global $wp_query ; debug($...
Doug Cassidy's user avatar
0 votes
2 answers
2k views

How to Change Author Posts URL

How can I display an authors archive by author id instead author slug like http://example.com/author/author_slug/ to http://example.com/author/123/
Anjum's user avatar
  • 974
0 votes
2 answers
2k views

WordPress Rewrite rule is not working

I am trying to create a rewrite rule for one of my custom page and here is the rewrite rule function add_my_rule() { global $wp; $wp->add_query_var('name_state'); $wp->add_query_var(...
Umesh Awasthi's user avatar
0 votes
1 answer
1k views

Change Wordpress comments url / word

Is this possible? For example, I want to change http://mysitesitesite.com/post-name/comment-page-1/#comment-452 to http://mysitesitesite.com/post-name/custonname-1/#customname-452 What should I ...
user1627363's user avatar
0 votes
2 answers
275 views

Custom url rewriting

I am struggling to create custom rewrite rules for wordpress. This is my url structure http://domain/cityprofile/?city=Sydney where city profile is a page template. Now i want to make this url as ...
Pramod Kumar Sharma's user avatar
0 votes
1 answer
132 views

Having WordPress control only certain pages with .htaccess?

Building a site that we want the home page controlled by it (main page will be the main blog page as well as the site home); it should also control a couple other pages such as the contact us page and ...
Brett's user avatar
  • 414
0 votes
1 answer
2k views

Localize URL bases

I run a non-English blog. I love that WordPress has been translated to Spanish and currently I use the Spanish translated version of WordPress. One thing that I'd really like to change is the URL ...
425nesp's user avatar
  • 188
0 votes
1 answer
979 views

How to obfuscate theme directory URLs

I'm rewriting this question because I realized it was totally unclear what I want to do. I'm looking for a way to "obscure" the theme directory so that absolute URLs that reference things like images ...
Tom Auger's user avatar
  • 7,046
0 votes
1 answer
801 views

Prevent Wordpress from automatically correcting URLs

I notice that if I type in http://www.example.com/pag I can land on an existing page that has a name like http://www.example.com/page_five. I don't know exactly what causes this, but I want to know if ...
emersonthis's user avatar
  • 1,327
0 votes
1 answer
3k views

How to customize a title by passing query string?

I have a profile page, it is a template. Every time when I click one of a doctor, the profile page will show the specific doctor info by passing a query string. Something like profile?doctorName=abc. ...
Pluto's user avatar
  • 121
0 votes
2 answers
177 views

wordpress url correction

I have my wordpress site in a root folder like this "www.mysite/myblog/" so to get to the blog you have to go to "www.mysite/myblog/" I'm wanting to make it so that a user can go to "www.mysite" and ...
ironman's user avatar
  • 129
0 votes
1 answer
962 views

ow to change cutsom page url of wordpress site using htaccess

i need help in httaccess rewrite of a wordpress site. i have url like below http://thewhiterabbit.dk/beta/steder-detail/?id=floos i want it to be like http://thewhiterabbit.dk/beta/steder-detail/...
Lucky Ali's user avatar
  • 105
0 votes
1 answer
373 views

Make Author Archive Page URL be a Subdirectory of a Custom Post Type URL

I have a custom post type with a custom URL structure so it works like: http://domain.com/custom-post-type/post1 http://domain.com/custom-post-type/post2 http://domain.com/custom-post-type/post3 etc. ...
GavinR's user avatar
  • 3,100
0 votes
2 answers
4k views

404 permalink errors on Pages only

I am having a strange issue with permalinks while using the /%postname%/ structure. I can access my custom post types using the pretty permalink localhost/cpu/<post-type>/<post-title>/ ...
RRikesh's user avatar
  • 5,635
0 votes
1 answer
3k 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 ...
tamilsweet's user avatar
0 votes
1 answer
413 views

Wordpress plugin url for form submit

I am creating a custom plugin that has dynamic forms and I wanted to ask on how I can create a dynamic form action url. Example is Contact Form 7, how did cf7 create the form action url without ...
Jorge's user avatar
  • 111
0 votes
1 answer
1k views

custom naming of search permalink /search/

I found this snippet online … function search_url_rewrite_rule() { if ( is_search() && !empty($_GET['s'])) { wp_redirect(home_url("/search/") . urlencode(get_query_var('s'))); ...
mathiregister's user avatar
0 votes
1 answer
841 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 ...
a_fan's user avatar
  • 955
0 votes
2 answers
1k views

custom wordpress rewrite

I am trying custom rewrite for following url... http://www.domain.com/lp/1 and it would be parsed using lp.php?p=1 I have tried following... add_action( 'init', 'aagt_rewrite_add_rewrites' ); ...
seoppc's user avatar
  • 165
0 votes
1 answer
1k views

Removing the base "Author" or changing it to something else. is it possible?

Is it possible to remove the AUTHOR base? Is it possible change it to postedBy so that the urls is site.com/postedBy/joe And finally, is it possible to remove a custom taxonomy base from the url so ...
Average Joe's user avatar
  • 1,879
0 votes
1 answer
2k views

Keep requested/entered url with add_rewrite_rule

I've got url-rewriting partially working. I have this rule: add_rewrite_rule('^somepage/([^/]*)/([^/]*)/([^/]*)/?','index.php?p=27&target=$matches[1]&arrival=$matches[2]&departure=$...
Denyo's user avatar
  • 21
0 votes
1 answer
190 views

Creating author Specific page URL

My Question is almost similar to author-specific-urls-in-wordpress and mapping-multiple-urls-to-same-page-in-wordpress. And i have followed the following steps Created a custom page (writer.php) ...
Umesh Awasthi's user avatar
0 votes
1 answer
1k views

Pass parameters to static home page brings up index.php latest posts

i have a Wordpress site that has the main page set to a specific template. www.mydomain.com -> main_page_template I am trying to pass in some params to my main URL as follows www.mydomain.com/?name=...
Chris's user avatar
  • 1
0 votes
1 answer
3k views

Retrieve query var within functions.php

I have query var set using the following filter: add_filter('init', 'add_query_vars'); function add_query_vars() { global $wp; $wp->add_query_var('user_login'); } I am able to retrieve ...
John's user avatar
  • 1,449
0 votes
3 answers
3k views

URL rewriting for WordPress Network (Multisite) subsite

We have an install of WordPress Network (Multisite) that has multiple blogs running under the url blogs.exampleurl.com where each subsite is blogs.exampleurl.com/site1 /site2 etc... We have a user ...
Jason's user avatar
  • 125
0 votes
1 answer
1k views

Rewrite loading custom template file but is_home() returns true, and there's no 404

I want to create some custom pages for my theme that don't appear in the Page listing in wp-admin. I have the following class which intercepts the url. class jtvRewrite { var $path = ''; function ...
deadlyhifi's user avatar
0 votes
1 answer
3k views

Rewrite on custom post type permalink not working?

My theme has a custom post type called 'portfolio'. I want the url to display 'projects' instead. I've change the rewrite on the register_post_type function to 'projects' but it doesn't change the ...
fxfuture's user avatar
  • 1,337

1
20 21
22
23 24
41