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
1answer
16 views

Append a parametter at first or last to a certain URL

I want to change a URL and want to add a parameter to the last or first of that URL. For example I have URL like below https://example.com/search/?cityId=49409&bedrooms=0&bathCount=0&...
0
votes
0answers
10 views

Pagination on taxonomy template not working after rewriting slugs

My pagination is not working on my taxonomy(sub-category) page. It keeps on loading my archive template. This happened after I applied function codes that re-write's url and producing all parent and ...
0
votes
0answers
9 views

File cannot get POST ID with rewrite rule enabled

I have this file that has always gotten the wordpress post_id correctly: <?php require('C:\xampp/htdocs/wp-blog-header.php'); require('C:\xampp/htdocs/wp-load.php'); ?> WP Post ID: <?php ...
0
votes
0answers
9 views

Custom Post Type with Custom Taxonomy and Permalink rewrite 404 issues

I am trying to set up a custom post type with a custom taxonomy applied with proper URL structure. What is working is website.local/demosite/products/technology/product-1/ this is showing correctly. ...
0
votes
0answers
11 views

I custom url form post wordpress

I have customized the post url link in wordpress, domain.com/post >> domain.com/cate/post but I want it to change the path to the new link. What do I do? function aly_post_redirects() { if ...
0
votes
0answers
15 views

How do I run a web app in my WordPress theme without the “wp-content/theme/…/webapp” in URL?

hope everyone's doing great. I have a web application that's pretty much a folder containing an index.html and some javascript stuff. I placed this folder in my theme folder. It works perfectly when ...
0
votes
0answers
24 views

Change permalinks structure for specific tag

I am looking for a code that can change the permalink of all my post who have a certain Tag. Regular permalink structure: /%category%/%day%-%monthnum%-%year%/%postname%/ The permalink structure I ...
0
votes
0answers
13 views

Wordpress Url post name comes first

I want to change my wordpress url from www.example.com/post to www.post/example.com post name comes before domain name.How we get that in Wordpress
0
votes
1answer
18 views

Wordpress Custom Post Type - Rewrite Query

So I have a project I am currently working on, where I have a Wordpress set to a permalink structure of /blog/%postname% for blog posts and pages are domain.com/page-slug/ I have created a custom post ...
0
votes
0answers
12 views

Category and subcategory in url Custom post types - 404

I added cpt and custom taxonomy. I writed function in my functions.php which adding in my url, category and subcategory then my url is "mysite.com/house/category/subcategory/post_name". Url ...
1
vote
1answer
23 views

Double domain name in category URL-s

My site runs on the latest version of WordPress. However, I have a problem with categories. Permalinks are set correctly and my category path looks like this: example.com/category-name. Links work ...
0
votes
0answers
20 views

Doing add_rewrite_rule only for specific post type

so I have these two rules for projects CPT. function addMyRules(){ // variables add_rewrite_tag('%eventid%','([^&]+)'); add_rewrite_tag('%version%','([^&]+)'); // release-...
0
votes
0answers
20 views

Add user name in the URL like sub-folder

I want to add a username or any other dynamic string after the site URL like http://example.com/username-a/page-url http://example.com/username-b/page-url or it may be any string in the URL like ...
0
votes
0answers
16 views

Rewrite rule with query strings

This thread works as expected. I have a question if it's possible to remove mypage. The following also works, but now every page is going to mypage. add_rewrite_rule( '^([^/]+)/?', '...
0
votes
0answers
28 views

Custom Post Type & Taxonomies - Rewrite

I use Custom Post Type UI plugin to create new post types and taxonomies. I created post type cpt_recipes "has_archive" => "recipes", "rewrite" => [ "slug"...
0
votes
1answer
44 views

Divi change project category slug

How to change taxonomy urls in wordpress? Following along with this question and this one But can not get the desired outcome. The default is: example.com/project_category/%category%/ What I want is: ...
1
vote
0answers
17 views

Front custom edit post page for each post

I have made a custom post type named ticket and I want to make an edit page for every single ticket like StackOverflow if the question is like this: wordpress.stackexchange.com/questions/109592/how-...
1
vote
0answers
15 views

Adding custom post category slug in permalink causes 404 error for pages and posts

I have added a custom post type, I want to add the custom post category in its permalink instead of the static base. For example for the custom posts I want the following permalink structure: mysite....
0
votes
0answers
16 views

CPT UI taxonomy URL slug

So, i have cpt "provider" and 2 taxonomies - "location and "service". When i create post "electrician in nyc" and tag it under "NYC" as locations and "...
0
votes
0answers
12 views

Add suffix to post urls and read its value?

i have some hard time using wordpress rewrite API, what we want is to create gallery and take info from the post to populate, however the requierment is that permalinks be structured like this: site....
1
vote
0answers
26 views

add_rewrite_rule is redirecting instead of rewriting url

I have a page that is accessible at /products/. I want to be able to access it at /products/canada/ontario/toronto/ (and not redirect to /products) The place names after /products/ should be query ...
1
vote
1answer
17 views

Access files at new location using old file paths

I have a bunch of posts that contain images with urls that follow this pattern: https://example.com/example_directory/files/2019/04/file.png I've imported the posts into a new install of wordpress on ...
0
votes
1answer
15 views

Best way to trigger rewrite rules

I typically call the rewrite rules with this action add_action('init', 'add_my_rewrite_rules') But what I do not like about it is that the rewrite rules are written every time an init action is ...
1
vote
1answer
33 views

How to remove wordpress directory slash

I have installed a website in my domain directory like example.com/website. The main issue or problem is that it redirects me to example.com/website/. I never want redirection and I just want that my ...
0
votes
0answers
9 views

Exclude “Blog” Page From .HTML Extension Addition in wp_rewrite

I currently have all the permalinks for pages/posts on my site on my site rewritten to add .HTML to the structure. However, in an effort to avoid 301 redirects I would like to exclude the blog page ...
0
votes
1answer
35 views

How to redirect Webp files?

I was using all images as webp files for performance, however I've stopped using and deleted them (only .webp files) all from FTP. Now having problems with 404 errors. I would like to redirect all ....
0
votes
0answers
13 views

Add folder to URL path

I have a couple of pages I would like to put in a subfolder and have it appear in the URL without affecting the URL structure for other pages. Example: https://www.example.com/subfolder/abc https://...
0
votes
0answers
13 views

Multiple permalinks for a single custom post with post ID in permalink and post title

I'd like to be able to have multiple permalinks for the same underlying post (so if the post title is modified, the people still will find the page) - So, One URL will work with 3 different options. ...
0
votes
0answers
12 views

Wordpress dynamic page handle in theme

I am creating a wordpress theme My index.php is working great I would like only 3 urls on my website / which is going to wp-content/themes/my-theme/index.php or an ther fine I do not have problem ...
0
votes
0answers
13 views

custom url for each menu

I have designed a plugin that has a page for user account with custom templates and graphics. Inside this page there are menus that each have a separate content. just like a WooCommerce my-account ...
0
votes
1answer
29 views

Add custom path to url to specific pages

Right now all pages path like /faq/ or /about/. I need path like /home/faq/ /home/about. I tried change url slug in edit page. But Wordpress change my home/faq to home-faq. I installed plugin Create ...
0
votes
0answers
8 views

Multisite installed in a sub directory but access without the directory

We already have a WordPress installation in the root of our domain (www.example.com) Since we don't want to mess up with that installation at all and our company wants to expand to other regions we ...
0
votes
0answers
18 views

How to set the same base url for two different taxonomies?

I have created two custom taxonomies. function themename_custom_taxonomies() { // Coaching Method $nieruchomosc = array( 'name' => _x( 'Nieruchomość', 'taxonomy general name' ), ...
0
votes
1answer
58 views

WordPress Attachment Page URL Rewrite!

I am creating a gallery site using FooGallery and having the individual images open in the attachment page. I tried a bunch of codes from here to rewrite the attachment urls from ?attachment_id=8184 ...
1
vote
0answers
16 views

Categories of Custom Post throws gives 404

I've created a custom post type for a website. This is the code: // Register Custom Expert Advice function expert_advice_post_type() { $labels = array( 'name' => __( '...
0
votes
0answers
11 views

How can I show multiple custom post and texonomy page with same url structure

I have a custom post type brands. I want to show brand-name like this: https://www.website.com/brands/brand-name/ On the other side I have taxonomy brand_type and I want to show brand-type like this: ...
0
votes
0answers
26 views

reWrite wp-content url to point on my cdn

I want to serve wp-content from my digitalocean Spaces CDN. I want to do this without a plugin. In the wp-admin/options.php the only URL I can change is upload_url_path.
1
vote
0answers
41 views

Cannot access wp-admin without trailing slash - .htaccess configuration for Wordpress behind a nginx proxy

I have a WordPress instance running via http-proxy-middleware, so I can have my WordPress blog under example.com/blog The problem I'm struggling with is I cannot configure the .htaccess file properly. ...
0
votes
0answers
28 views

Rewrite htacess rule doesn't work

Inside the page directory I have multiple pages such as admin-add-account, registration, and I'm trying to rename them from www.example.com/page/admin-add-account.php to www.example.com/admin-add-...
1
vote
0answers
14 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
11 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
23 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
40 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
24 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
21 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
35 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-...
0
votes
0answers
19 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. ...

1
2 3 4 5
39