Tagged Questions

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)

2
votes
0answers
26 views

add_rewrite_rule, plugin activation and plugin deactivation

I see a lot of example showing to call add_rewrite_rule in your init hook, e.g. function add_my_custom_rewrite() { add_rewrite_rule(... } add_action('init', 'add_my_custom_rewrite'); and in ...
0
votes
1answer
19 views

Worpress url parse

I want to display posts in certain category only with given tag. Problem with parsing url slugs. For example, I have category named 'Clothes': example.com/clothes/ I can get posts in this category ...
0
votes
1answer
20 views

Later change of taxonomy slug base not changing permalink

When defining a taxonomy I successfully set the slug base for it as well, all via functions.php. However, any change on the slug’s base (via editing functions.php again) is being recognised, i.e. it ...
0
votes
1answer
23 views

Best way to hook a custom url?

Let say I've a custom page with slug created "/products", I want user will be able to POST to a form with url "/products/create" and allow us to render some JSON output. The "/products/create" page ...
0
votes
0answers
13 views

Website directories sharing same root causing URL problem

I have a problem that is a 101 consequence of not using Wordpress multisite feature. The decision was not mine, and it can't be changed. Now, this is what happens: 3 separate wordpress websites are ...
0
votes
1answer
21 views

Modifying rewrite rules to use <custom post type>/category/<custom taxonomy term>/

I know I can add a rewrite rule to accomplish this but I'd like to affect the links generated by WordPress (such as when I put a custom taxonomy term into a menu) I have spent the entire day today ...
0
votes
0answers
14 views

Built-in Sitemap on Multi-site install produces 404?

We have a subdirectory multi-site install. Some documentation I found says that WordPress has a built in sitemap, at /sitemap.xml. Trying to access domain.com/blog/sitemap.xml produces a WordPress ...
0
votes
0answers
9 views

Add custom post type name in term link?

Is possible add name of custom post type in link of taxonomy term and remove slug of taxonomy? The default link is: slug_taxonomy/term_name I like: post_type_name/term_name Note: I use WPML ...
1
vote
0answers
15 views

How make a multi language routes, with rewrite rules or rewrite endpoints?

I want to know a concept of making a multi language routing system for WP. That is the best practice, to make this routing system with add_rewrite_rules for pages post arhive etc in part, or to use ...
0
votes
0answers
12 views

How write rewrite rule to reroute tiny url?

I want to know how to write a regex : for exemple url: http://localhost/wordpress/post-title/lang/en become http://localhost/wordpress/post-title/en. I need a global rule for all types of posts? ...
0
votes
0answers
29 views

Clean/Pretty URLs in Wordpress Using Custom for Custom Variables ($_GET)

I have a Wordpress page that I am passing custom variables to; I was able to successfully get this page to accept the custom variables using the following: function add_query_vars($aVars) { $aVars[] ...
1
vote
1answer
40 views

Use custom template on certain URLs

I'm building a simple two language site. I'm using Polylang for posts, and also have a custom post type, "Artist." In order to keep it simple on the back-end, I'm not using Polylang, just a few custom ...
0
votes
1answer
23 views

URL RewriteRule doesn't work when using WP Database Participants in my WordPress website

I'm using WP Participants Database plugin in a site developed using WordPress and I'm trying to transform: ...
0
votes
1answer
38 views

template_include not loading -instead goes to index.php

I have the following code: <?php function ex_rewrite_rules(){ //discography query variable rewrite add_rewrite_rule( 'artists/([^/]+)/discography/?$', ...
0
votes
3answers
181 views

URL rewrite and navigation structure for wordpress custom post type

I have created the following custom post types: Artists Albums Songs Songs are children of Albums, Albums are children of Artists. I am trying to set up a navigation structure that shows this ...
0
votes
0answers
44 views

Custom shortcode with dynamic rewrite

I'm trying my hands at developing a plugin but have run into an issue I can't seem to find any good answers to. I want users to put a shortcode on any page they want, and the shortcode is replaced ...
0
votes
0answers
34 views

Custom post type empty slug breaks permalinks for pages

In attempt to avoid posting a ticket to essentially reopen #15082 I'm posing here first. I have been vigorously dealing with this CPT permalink rewrite for countless hours now. After a 3am kinda night ...
0
votes
0answers
82 views

Archive page for a custom post type using WPML

On a website using WPML in last version, I have a Custom Post Type using an archive page, called archive-agenda.php. CPT is defined with this code : register_post_type('agenda', array( 'label' ...
0
votes
1answer
47 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 ...
1
vote
1answer
41 views

generate_rewrite_rules (action) vs add_rewrite_rule (function): which one is preferred?

I see these two methods can be used to create new custom rewrite rule, so under what situation which one is preferred? I suppose they are doing the same thing? I can either use: add_action( ...
0
votes
0answers
48 views

Relative URL filtering

I am using the code below as part of the Relative URL plugin. It works well, except it is making external calls relative and I only want calls to my local site to be relative. Is there a simple way to ...
0
votes
0answers
23 views

Prevent guessing slug

I have the following rewrite rule function add_rewrite_rules($rules) { $new_rules = array( 'buscador-latte/(.*)/?$' => 'index.php?page_id=866&search_parameters=$matches[1]', ); ...
0
votes
0answers
26 views

Can I use pretty URLs for paramaters without query_vars?

I have a plugin that retrieves data from custom non-WordPress tables. I'd like to be able to add pretty URLs to retrieve the data, but as far as I can tell, if I use the add_rewrite_rule and ...
0
votes
0answers
15 views

Removing search base url

Is there a way to remove all slugs from wordpress url (category, tag, author, date AND search!)? (so that something like http://example.com/search/foo would be rewritten to http://example.com/foo) I ...
0
votes
0answers
14 views

Rewrite Rule To Own File

Is it possible to add a rewrite rule to redirect to a page other than index.php? For example: add_rewrite_rule('([^/]*)/preview/?','preview.php?page_title=$matches[1]','top'); The above code only ...
0
votes
0answers
16 views

Wordpress internally rewrite rule challenge

Questions 1: I work on wordpress website for a client. But the client like to have a deep level url structure. The custom post type can be from level 1 to unlimited levels in the url structure. ...
0
votes
0answers
38 views

htaccess url rewrite within WP installation

I want to use one of my subdomains to rewrite urls and finally forward to an origin extern domain. Example: goto.mydomain.com/1saKCA3 -> externdomain.com/1saKCA3 I already tried to implement the ...
0
votes
0answers
8 views

Creating custom rewrite rules for site sections

I have a WordPress site with several custom post types. I would like to group them by a URL prefix. Maybe something like this: www.example.com/ prefix_one/ post_type_one/ ...
1
vote
0answers
37 views

custom taxonomy archive by year

there is one custom post type News there are 3 taxonomy terms(like category). 1). press-release 2). in-the-news 3). events i have list out all this three category. now what i am looking for is ...
0
votes
1answer
32 views

How to use a hierarchical taxonomy in permalinks?

I use permalink: /%category%/%postname%.html and want to have categories like this: Wheels Mercedes Toyota Brakes Mercedes Toyota I want their URLs like this: ...
0
votes
2answers
83 views

What is wrong with my rewrite rule for a page URL with query parameters and short codes?

I'm new to WP programming and I am having trouble with what would be a simple problem in other environments. I created a page (cdl-manual) using the normal WP admin UI. Then I added some functions to ...
5
votes
3answers
199 views

Getting the Site URL Including the Front Base

If my permalink structure is set to /blog/%postname%/, how can I retrieve a URL for my site which retrieves domain.com/blog/? With the permalink structure mentioned above, when using site_url();, it ...
0
votes
1answer
17 views

How to retrive previous Domain URL in Wp

One of my firend accidently! Changed the WorsPress domain address to his expired domin address now we can't even connect to WP Login Page and WP is redirecting us to a domain address which does not ...
0
votes
0answers
47 views

Redirecting .aspx URL to a wordpress site page

A friend of mine have an existing site built in .NET, all the pages have .aspx in url on that site. Now we want to convert that whole website into WordPress. But the problem is that we don't want to ...
2
votes
1answer
72 views

custom taxonomy and custom post type url conflict

i am having one serious url issue. there is news custom post type. it's slug is news. News taxonomy slug: news_category News taxonomy url is: http://domain.com/news_category/press-release i want ...
0
votes
2answers
27 views

How can I set up a secondary permalink structure?

So I have a situation on a site where I need multiple permalink structures. Now, I already know what you're going to say because literally every Google and SX result I've looked through says the same ...
1
vote
0answers
117 views

Remove subcategory and category with some rules from permalink

My current option for permalink is set to /%category%/%postname%/: I have a category 'stati' and parent category 'italian', 'german'. This parent category has some other parent category, for example: ...
0
votes
0answers
29 views

Using similar CPT rewrite slug and endpoint?

I'm currently using "details" as an endpoint to divide information from a CPT with many fields across multiple views. My URIs look similar to /location/location-name/details/rates/ I've got this ...
0
votes
1answer
17 views

URL Rewrite when WordPress is in subdirectory

I have a website with WordPress installed in a subdirectory called "articles." The rest of the site is built outside of WordPress. I'm wondering if it's possible to rewrite the author page URLs from: ...
-1
votes
1answer
27 views

Remove base from the custom post type URL [duplicate]

I wanted to add blog before the post slug in the URL. The URL for the post type page was: http://example.com/blog/post-one So basically to add blog before the posts url in Settings >> permalink ...
0
votes
1answer
33 views

Rewrite rule not passing variable

I have the following code in my functions.php file, and it simply will not work to return the value passed via the URL. This is the code below: function custom_url_source() { ...
1
vote
0answers
24 views

changing comment-page-# to something like review-page-#

When you enable pagination for comments in wordpress the typical pagination page for a comment is "comment-page-1" "comment-page-2" etc. what I want is this to appear like "review-page-1" ...
0
votes
0answers
32 views

how to rewrite folder name in url to another name

I am wondering wether it's possible to use Apaches .htaccess to rewrite a folder name - using a WordPress function. Lets say I have a url like: http://example.com/folder1/folder2/page.php Now I ...
0
votes
1answer
19 views

Why is a custom post type's URL “/?cposts=name-of-the-post” but default post's URL is “/?p=ID”?

The normal posts, whose post_type is "post" in the database, are accessed through the URL structure of www.blog.com/?p=ID where ID is the actual ID (the number) of the post found in the database. ...
2
votes
2answers
265 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, ...
4
votes
2answers
19 views

How can i avoid the permalink start with 'blog' while using the custom post type?

I used the custom Structure /blog/%category%/%postname%/ for blog. also i have a custom post type named 'FAQ' while viewing the faq posts, it is showing the /blog/faq/%faq_category%/%postname%/. When ...
0
votes
0answers
37 views

How can I change the lost and reset password from action url?

This a second part to my original question posted via the following link How to change/rewrite the lost password url? Submitting the lost and reset password from generates a 404 because there action ...
0
votes
1answer
36 views

Flush rewrite rules on option update with Settings API

I'm working on some plugin where I need to enable custom URL rewrites. I want to enable editing of custom URL through Settings API, so basically I did everything that's needed to validate and update ...
0
votes
1answer
20 views

Needed to change slug to access page

I've created a page, with the slug "news". Something happened because now I can't access /news .. I needed to change the slug to "news_", or something, to access that page. I checked the database to ...
0
votes
1answer
87 views

How to change/rewrite the lost password url?

I used iThemes Security (formerly Better WP Security) hide back-end functionality to change the login url to /signin however clicking the lost password link /wp-login.php?action=lostpassword now ...