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
1
vote
0answers
8 views

Changed pagination URLS to use p= instead of paged=

I am trying to rewrite my pagination URLs to use p instead of paged so they go from... example.com/myposts?paged=2 to example.com/myposts?p=2 How is the best way to do this? Do I need to use the ...
0
votes
0answers
7 views

Rewrite Custom Post Type URL without breaking RSS Feed URL

I am rewriting the URLs for a custom post type as follows: In my register_post_type code I have: 'rewrite' => array( 'slug' => 'magazine/%magazine_categories%', 'feeds' => false, '...
0
votes
1answer
22 views

Remove custom permalink base from CPT custom category and custom tags

I have a 'resources' CPT with 'resources_category' (custom category) and 'resources_term' (custom terms). They are all working, however the category and terms URL's pick up the base permalink slug ('...
1
vote
1answer
37 views

404 error- issues with pages after adding custom rules for posts

I am trying to create a custom translation for my website. Quick Story: I am facing "404 error-Page Not Found' issues with pages after adding custom rules in functions.php $newrules['^th/(.*)$'] =...
0
votes
0answers
20 views

How to fix the taxonomy and custom post type slug/url

I have a custom taxonomy and post type. When I click on a taxonomy item the slug changes to: http://localhost:8888/mysite/developments/development-name-here/ And that page is using taxonomy-...
0
votes
1answer
18 views

How can I use get_post_meta with add_rewrite_rule to build custom permalinks?

I'm trying to change the url structure of my custom post type posts, but It's not working correctly right now. What I'm trying to do is change the urls of my custom post type (Test) posts via ...
1
vote
0answers
32 views

rewrite URL based on selected taxonomy for post page

I have a taxonomy called "group", and their values like "red", "blue", "green" (these are generating dynamic" no any fixed group value. during post ...
0
votes
1answer
6 views

Make the blog page a child of another page and rewrite the blog url

I am trying to make my WordPress blog page a child of another page and have the url structure reflect that. However, I also have other custom post type archive pages set up that should not be ...
0
votes
0answers
23 views

I have a problem with WP_Rewrite

I have a problem with RewriteCond. I admit that I don't know how to use these directives (or maybe I haven't searched enough). I have a URI like this: /photos=the-most-appreciated-books-about-fashion-...
1
vote
0answers
16 views

SEO friendly category listings

I am developing a plugin that has listing items. I've created a shortcode that lists all the items, but it has a categories dropdown. On dropdown change it should load a new page with only the ...
0
votes
1answer
19 views

Creating a custom rewrite for a single page

I am quite new to working within wordpress but am getting along quite smoothly. I have setup a website where its downloading external JSON data from rapid-api and then displaying them in my design. ...
0
votes
1answer
10 views

Having a problem with rewrite_rules and rewrite_tags - url not rewriting properly and query var missing

I am almost tearing my hair out trying to get to grips with the Wordpress rewrite rules and tags. From within a plugin, I've created a page called 'childpage', it is the child of another page called '...
0
votes
0answers
11 views

Default Post post type and custom post type rewrite slugs

So, currently, my blog page is at /blog/ and I also have 2 custom post types. What I'm trying to get is to have all the posts/archives of the Post post type show under /blog/, and for one of the ...
-1
votes
0answers
13 views

I don't know where the URL that is attached to to this image is stored

I need to know where to go in git to modify the image and also the image URL for this image (https://thedesigninspiration.com/blog/2018/09/20/ragnars-forge/). I will need your email to add you as a ...
1
vote
0answers
18 views

How to build custom route by adding taxonomies to URL ? ex: www.demo.com/communities/palo-alto/

I am trying to achieve this in WordPress, but no luck Here '/communities' is custom Taxonomy of post type 'PAGE', '/Palo-alto' is term from communities taxonomy . I want user first to click on ...
0
votes
0answers
18 views

Remove language slug to a path in a cloaking url

I have created a cloaking url, but I have a problem, I am using a translation plugin called translatepress. When I change the language the cloacking url changes from mysite.com/refer to mysite.com/es/...
1
vote
1answer
24 views

Why slash is removed after domain?

I have installed different sites through my admin panel as below screenshot. But when I click any of the menus of My Sites it is redirected to the wrong URL like, https://www.example.comwp-admin/...
0
votes
0answers
19 views

How to properly set the rewrite rules for this case?

I'm having an issue wih the rewrite rules. I can't figure out how to properly build it to get what i want. I got a taxonomy with a slug called "acceso-mayorista", which mean a place where ...
1
vote
0answers
13 views

Display Externally Retrieved Data within a Custom Template

I'm attempting to connect a firebase project to my wordpress site via a plugin. So far, using the kreait/firebase-php package, I'm able to retrieve the data that I want from the plugin and var_dump it ...
0
votes
1answer
27 views

How to change URL for custom post type archive?

I'm trying to change the URL for my custom post type archive. At the moment, the archive of my post type has the URL https://example.com/myposttype/ I want to change that to https://example.com/xyz/...
0
votes
0answers
17 views

How to handle this wordpress custom post type rewrite problem?

i have a custom post type called "carrier", this cpt has a custom taxonomy called "carrier-category". the cpt has the following rewrite: 'rewrite' => ['slug' => 'carrier/%...
1
vote
0answers
8 views

Url rewrite on index.php?term=[term_name]

Im having some troubles with Url rewrite ... I have a Custom Post Type with an custom taxonomy... I would like to when visiting the url [ site_url ] /[ custom post type slug ]/[ term_slug ] to ...
0
votes
0answers
11 views

Why am I getting 404 after using category_link and post_link filters?

I want to customize the posts category and single permalinks. I'm doing something like this: add_filter('post_link', 'set_post_links' , 10, 2); function set_post_links($permalink, $post){ if(...
0
votes
0answers
42 views

My post permalinks are redirecting to the post archive page for some reason?

I updated my permalink structure so that my posts were prefixed with /stories/. So in Settings -> Permalinks: Custom structure: /stories/%postname%/. My post permalinks updated correctly in the ...
1
vote
0answers
22 views

Trying to find the location of a rewrite of the URL query

After my original question was deleted, I'll try this another way. Here's the problem. If I update my WordPress from 5.4 to 5.5, some pages are missing some information. I have a folder-like structure ...
0
votes
0answers
17 views

Multiple Taxonomy Items for Separate URLs

Can anybody just let me know if this is possible for the start? I have Custom Post Type "Recipes" and a Custom Taxonomy "Type", which consist of multiple items: breakfast, snack, ...
0
votes
0answers
17 views

Wordpress keeps removing query var from the URL

I have a custom post type "press-release" that I pass a query var to the template through the URL. The URL structure looks like this. MYDOMAIN.COM/press-release/TITLE-OF-RELEASE/?client=123 ...
0
votes
0answers
6 views

URL Category not 404

I have an issue with redirect originally my URL like this /tips/carrieretips/page/4 but when I add string/page/4` in URL is still OK Like this /tips/carrieretips/page/4/string/page/4/string/page/4/...
0
votes
1answer
63 views

Custom post type category, taxonomy and URL rewrite problem

I'm fairly new to WordPress and I'm working on a website that has an abundant category of products. I want to create a custom post type to add a bunch of products. I'm going to demonstrate what I am ...
0
votes
0answers
16 views

Different URL depending on taxonomy?

Is it possible to create a custom post type with 2 custom taxonomies that will have different URL depending on the taxonomy? Let's say I have created "custom_post" and assigned it to both ...
0
votes
0answers
11 views

How to create such URL structure for CPT with custom taxonomy

I have a CPT - Market (eg Footlocker) And I have a taxonomy - Countries But countries are divided into regions, so they look like a subcategory ( Europe - France, Germany, etc) I want to get a URL ...
0
votes
0answers
14 views

404 when using add_permastruct()

My wordpress site has the following URL structure defined in WP Admin > Permalinks Custom Structure : /articles/%postname%/ For all my default posts. I also have the following rule defined within ...
0
votes
0answers
12 views

Include page name in posts slug

I have created a custom page template with option to select a tag from posts Categories to query the respective posts with that tag when the page is opened. Page with name Trips are created, custom ...
0
votes
2answers
22 views

rewrite rule generated with mpdf to a shorter version

I'm saving some pdfs into a folder with mpdf, the urls of pdfs are like this: https://example.com/wp-content/themes/mysitetheme/invoices/invoice_8937.pdf I want that if someone open this url it will ...
0
votes
1answer
13 views

SEF add_rewrite_rule & add_rewrite_tag not working

I'm making SEF urls for my plugin. To logic is: if there is my_shortcode on the page, then pass the rest of url as parametr dir= This code is perfectly works on one of my wordpress installations and ...
1
vote
1answer
54 views

Server (WordPress) redirects files that are not supposed to (using htaccess)

I use .htaccess to redirect some addresses or avoid some addresses to be redirected. Basically, I have all things redirected to another domain except for certain addresses that I specified. So example....
1
vote
1answer
74 views

Wildcard forward all posts and pages with few exceptions

I want to move my domain from example.com to example.dev and also set a wildcard forward. I use WordPress for blogging, now I want all posts and pages to be moved to the new address but I want some ...
0
votes
1answer
34 views

MySQL-inserted custom taxonomy term lead to 404, flush rewrites doesn't help

I import my custom terms from a desktop program using MySQL queries. But all the terms lead me to a 404 page. I tried flushing rewrites many times, it didn't help. It only helps when I save individual ...
0
votes
0answers
43 views

Rewrite WordPress Url from root to subfolder without moving files

I have a WordPress installation in the root folder "example.com/". I want the url to be "example.com/blog". (Rewrite from root to folder "/blog/") Is it possible to do ...
0
votes
0answers
35 views

Define multiple prefixes for custom post type

I have created CPT called "Pharmacy" which have a lot of pharmacies inside (approx 10.000) Pharmacies offer 2 different services (skin & scalp) and some provide both services but some ...
0
votes
0answers
9 views

Losing get parameters when redirected due to old url

I have a WordPress site which people link to with some get parameters, basically like so: https://www.example.com/2020/09/01/my-slug?myParam1=something&myparam2=somethingElse Now I noticed that if ...
0
votes
0answers
11 views

How avoid error 404 after add post id to slug for custom post type? (post_type/%post_id%-%slug%/)?

I want to have permalinks which will be look like: example.com/mypost/%post-id%-%slug%/ And the following code do it. But when I try to go to url of the post... I get error 404. I have this code: To ...
1
vote
0answers
17 views

How to figure out redirection and contents in hybrid solution containing word press content and legacy code (ASP.net)

I have legacy solution(ASP.net) hybrid with wordpress content, I have access to my ASP.net code base but not wordpress content. How can I figure out which section in my site is served through ...
0
votes
0answers
16 views

get_categories() retrive post_tag instead category

I want to rewrite my category to a specific URL. but I get post_tag instead of category when I use get_categories(). Here my code add_filter( 'category_rewrite_rules', '...
0
votes
0answers
16 views

URL of Website Changed by itself

I have a problem with my client's website. It is from time to time changing its URLs by itself. E.g. we have there a website directly going to /get-started and it for example was changed to /get-...
0
votes
0answers
21 views

Wordpress pagination broken for page 2,3 with custom permalink. Redirects to baseurl

I have a forum installed with my Wordpress site. My pagination does not work and redirects pages 2,3, or more to baseurl when they are on homepage. Here are the settings: Forum baseurl: https://...
0
votes
0answers
13 views

How can I rewrite the URL of my custom taxonomy to include the year?

I've created a custom taxonomy that allows my school's newspaper to organize stories into special issues. However, some of the special issues we publish are the same every year. For example, our Black ...
0
votes
1answer
10 views

How to change Custom Permalink for Taxonomy? (remove the slashes from term-slug)

I have my code to register my custom taxonomies. function themename_custom_taxonomies() { // Coaching Method $coach_method = array( 'name' => _x( 'Nieruchomość', 'taxonomy general ...
0
votes
0answers
10 views

Best Place to 404 a Non-Matching Custom Query Var

I've created a 'tabbed' layout on custom taxonomy archives on my website and successfully rewritten my permalinks so that visitors to mywebsite.com/player/player_name/tab_name see some conditional ...
1
vote
1answer
62 views

remove query arg from url after set query

i make migration plugin from specific script to wordpress, but i have a problem on redirect old urls to new one old urls is like book.php?view=12a34b56 and i want redirect it to book/12a34b56 i try to ...

1
2 3 4 5
39