Skip to main content

Questions tagged [permalinks]

A permanent link to an item (a blog post, an attachment, ...). The default structure is "?p=123", but WordPress can handle "pretty permalinks" and will rewrite them internally to the former version. If you have a question about special rewrite structures you should use the [url-rewriting] tag.

Filter by
Sorted by
Tagged with
0 votes
2 answers
23 views

Custom permalink for 'post' not working

I want to set custom permalink for (standard) post and have url structure, like site.com/guide/news/ - blog list (or archive) page site.com/guide/news/post-name - for single post My steps: I have a ...
0 votes
0 answers
12 views

Accidentally Changed Permalink Structure

I accidentally changed my permalink structure form "postname" to "plain" but when i realized all my articles that were ranking are disappeared so i changed it but nothing changed ...
0 votes
1 answer
825 views

Added .html to Woocommerce permalink but pagination don't work!

I'm recently added this code to my Wordpress website to add .html for my product category. It worked okay with the category (http://mywebsite.com/parent-category/product-category.html) but when I ...
0 votes
1 answer
31 views

WordPress CPT & Custom Taxonomy with the SAME Permalink Structure

I have a CPT: 'Guide' and Custom Taxonomy 'Guide Category'. What I want to achieve is: The CPT permalink structure is: example.com/guides/custom-taxonomy/post-name/ So that the following should ...
0 votes
1 answer
45 views

How to automatically flush permalinks?

Is it possible to write function that will trigger flush_rewrite_rules() on a timer? I would like for it to run every hour
0 votes
1 answer
1k views

WooCommerce product permalink changed

my product structure was like the following before: https://example.com/producto/product-name/ Now, I've done some updates to the translations and this is how the product urls appear now: https://...
1 vote
1 answer
822 views

How to eliminate permalink prefix in Wordpress Multisite

I have installed the multisite plugin for Wordpress; I have one website in English, and the other in French. However, when I go to Settings -> Permalinks, my English website shows this: I don't ...
0 votes
1 answer
909 views

Hyperlinking images on posts to permalink

i have this site with only one image in each post.. how do you turn the posted image to hyperlink to the permalink? Most images are from an external source and is just automatically embedded on each ...
1 vote
1 answer
3k views

AddToAny shortcode in the loop

I try to add addtoany shortcode in my custom loop page but the shared link stays always the same for each posts in the loop. <?php global $post; echo do_shortcode('[addtoany url="' . ...
1 vote
1 answer
745 views

How to get correct URLs in network wide menu (Multisite)?

I'm using this function to switch to my main website's navigation and display it on all sub sites in my multisite network. Ideally the links should have the following format: http://www.mysite.com/...
1 vote
2 answers
1k views

Only plain permalinks working

I've a problem with a site (part of a multisite structure). All of a sudden all the static pages are showing the list with the last posts, except for the homepage. The single posts are working fine. ...
0 votes
1 answer
1k views

How to change pagination base from slash to query form?

Can this function... function custom_pagination_base() { global $wp_rewrite; $wp_rewrite->pagination_base = 'p'; $wp_rewrite->flush_rules(); } add_action( 'init', 'custom_pagination_base' ); .....
1 vote
1 answer
1k views

How to use all tags in post permalinks

My site with pictures is set up so that the posts do not have a title and have only tags. I would like to know how to use all tags in permalinks settings?
0 votes
0 answers
18 views

woocommerce permalinks like "?p=%post_id%"

I need to use a permalink to a product page in woocommerce like "?p=%post-id" The settings do not seem to work because I try this I get a link like "?p=15/name_of_product" While ...
3 votes
1 answer
4k views

Getting a 500 internal server error ONLY on wp-admin/options-permalink.php

I have access to the admin panel, and everything works fine. I can click settings->reading and change anything I want to. But if I click settings->permalinks I get a 500 internal server error. Here's ...
2 votes
1 answer
742 views

Add a URL prefix to permalinks of News category and sub-categories of posts only

I changed http://domain.com/%postname%/ to http://domain.com/news/%postname%/ using the answer provided here: Add a URL prefix to permalinks of one category of posts only. But I am having issues with ...
0 votes
1 answer
4k views

Uppercase vs. Lowercase page slugs

We are migrating a site to WordPress from another platform. An issue came up with the URLs--some are uppercase, some lowercase. I allowed uppercase using this solution: How can I make Capital letter ( ...
0 votes
2 answers
716 views

Permalinks for Custom Post Types and Taxonomies

I've been trying to figure out how to achieve a particular permalink structure to no avail. Here's the situation: On my site, I have one main custom taxonomy (module). I have five custom post types (...
1 vote
1 answer
1k views

Same base for category and post

I'd like to have the following: Single Post test.com/blog/new-category/post-name/ Category test.com/blog/new-category/ So I changed the Permalink structure to: /blog/%category%/%postname%/ and the ...
0 votes
1 answer
228 views

Problems with rewrite rule

I really want to figure this out. What I want to do, is this URI http://www.hotels-lithuania.net/index.php?page=76&type=hotels&id=1 transform to http://www.hotels-lithuania.net/item/hotels/1 ...
1 vote
1 answer
3k views

How to get list of posts from permalinks?

I am using an API which tracks metrics on parts of my site. The only useful bit it saves though is the URL (permalink). What is the most efficient way to query up all the posts that match those ...
0 votes
1 answer
1k views

WP adding noopener and noreferrer to all links

I'm using Classic Editor (not Gutenberg) and WP is adding rel="noopener noreferrer" to ALL the links, whether it is target="" or target="_blank" or target="_self"! I want to remove noreferrer from my ...
0 votes
2 answers
2k views

Change Category Base For Custom Post Type or Posts Page

I have a few questions and I don't think the outcome I want is possible without adding a custom taxonomy and redoing a bunch of work. I have registered a custom post type - gallery - with taxonomies ...
0 votes
1 answer
2k views

Images not loading on webpage, and links to other media give 404 Not Found

Had some recent problems where to start with only homepage text was visible, all other pages/links gave 404 Not Found. Now managed to get pages to function but all images fail to load, plus links to ...
0 votes
0 answers
17 views

How to get selected variation from URL?

I create my own way of displaying the list of available variants on the product page. I display individual variants on the main page of the store so that when the customer goes to the product page, he ...
1 vote
1 answer
43 views

Is there a way to auto-link to products when writing a post?

I have created a post where I list items in my product catalogue and add links to said products. Currently, I manually add links to the products once I have typed them out. However, I want to know if ...
2 votes
1 answer
914 views

Permalinks broken regularly

On one of my sites the permalinks are broken regularly. After saving them again it's all fine but a few days later the permalinks result in not found and I have to save them again. There are no ...
0 votes
1 answer
2k views

How to solve 404 permalink errors on nginx server

I can't solve this issue. I tried everything I found over the web. I first tried configuring my nginx.conf following the example on codex with no success. https://codex.wordpress.org/Nginx I found ...
0 votes
1 answer
1k views

WooCommerce return 404 in the product page

I am making an Ecommerce website with the plugin: OCEANWP. I had an issue with links of products, because they aren't the same so i changed it in Setting > Permalinks, but after when I go to the ...
1 vote
1 answer
3k views

Remove custom post type slug from URL and add taxonomy Slug

I am having an issue while changing a custom post type URL. Current post type URL is: http://example.com/product/product-slug where product is a custom post type. I want to change it to: http://...
1 vote
2 answers
4k views

NGINX serve Wordpress from sub-path fails with 404, how to fix?

I'd like host review branches for staging, to test and get feedback before publishing to production. I tried to follow some documentation provided online such as the NGINX recipes ( https://www.nginx....
0 votes
4 answers
1k views

Category URL's 404 after setting category base to '.'

I want to remove /category from URLs. I have set category base to "." I have some "category urls" which previously looked like /category/category-name/sub-category-name They are now /category-name/...
0 votes
1 answer
702 views

Permalinks of New Pages and their Parents

I am running into a new issue where when I attempt to create a new page, the permalink is not being auto generated. For instance On the 'Add New Page' page, I select 'Our Club' as the parent (which ...
0 votes
0 answers
16 views

Display last category child in permalink

I have a travel blog with multiple categories and subcategories and I'm trying to find/create some code to include on my functions.php file so the permalink only contains the last nested subcategory ...
1 vote
2 answers
2k views

Wordpress Pages Redirecting to Root with Wordpress Multisite (Sub-Directory)

I am working with Wordpress Multisite (with sub-directory structure). Everything works fine instead of Wordpress pages. When I publish a page and I try to visit it, it redirects to the main multisite. ...
0 votes
1 answer
809 views

Category URL to use same string as Post URL Permalink

I want to set up my site to have the following permalink structure: /learn/%category%/%postname% So in the permalinks section of wordpress, I set that as the custom structure. The issue is, when I ...
0 votes
2 answers
758 views

Does a parent page's post_title have to appear in a child page permalink?

If I have a page called Home and then a child page with Home as the parent, is there a way to avoid 'home' appearing in the permalink for the child page? I've noticed this with a one-page scrolling ...
0 votes
1 answer
235 views

Is there a way to show attachment IDs on the attachment info screen?

I want to use attachment IDs for shortcodes, but if the image is published with a permalink, it's harder to find the ID. I've found some functions online that can turn the attachment url into its ID, ...
0 votes
1 answer
2k views

Permalinks in Multisite not working

I'm using a subdomain multisite and I receive a 404 when trying to visit posts. The main domain works, but the permalinks aren't working. When I use the default permalinks, they work, but when I use ...
0 votes
1 answer
984 views

Difference and usage of uri (e.g. get_directory_uri) and absolute path (e.g. get_directory)

What is the difference uri (e.g. get_directory_uri) and absolute path (e.g. get_directory) and when it the best time to use each?
0 votes
1 answer
838 views

post_name is not stored until post is published... where should I store my slug until it goes live then?

important try as normal contributor user, not as admin see here I actually have it reproduced. Seems like a bug to me but whatever. I want users to choose their slug. Well, as you cannot store ...
0 votes
0 answers
15 views

taxonomies ACF Wordpress

I have a landing page that follows the same UI but depending on the URL path, it will render different content. for example the base URL is sitename.com/lp/top10/. following that it will either be A ...
8 votes
6 answers
17k views

How can I make Capital letter ( upper-case ) permalinks?

How can I make a link like this? http://www.lifecellskin.us/Dev/About the "Using_Permalinks" part, A is Capital letters. But WP automatically convert upper case to lower case. I'm trying to convert ...
0 votes
1 answer
762 views

url not using query string no longer working

I have a few websites where I have coded a custom feature to get data from the database, these are all older sites. the page fetches info by grabbing the last part of the url and turning it into the ...
0 votes
2 answers
1k views

Custom post type slug as page slug

I have a custom page type dictionary and all of the dictionary items have URLs like this: example.com/dictionary/item dictionary has has_archive => false The problem occurs if I also create a ...
2 votes
2 answers
785 views

Create a custom php page and load it at a specific slug

I have this painful problem with a client. They need to load a feed from a remote endpoint into a page that fits their WordPress template design.. They also want to display the page at a particular ...
0 votes
2 answers
765 views

Custom PHP form needs refresh to load page correctly

I have a single page site with all content on it. The only other page I have is a "thanks for submitting the contact form" page. In this "thankssubmit.php" page I have my PHP form ...
1 vote
1 answer
3k views

After database migration, posts not showing up in dashboard

Transferring domains, I migrated a WordPress database using the export/import functions in phpmyadmin. Everything worked as intended, until I tried to change permalink appearance in the WP dashboard. ...
0 votes
2 answers
2k views

Remove index.php from url in permalinks over IIS server (web.config)

I have a WP installation in its own folder (my-domain.com/site) and I'm trying that site works over my-domain.com. I'm not moving the installation files, actually I'm just giving to WP its own ...
0 votes
1 answer
9 views

Where does the redirect from shortlink to permalink happen?

When requesting short urls they are redirected to their matching permalink, for instances : shortlink permalink /?cat=category_id /category_base/category_slug /?p=post_or_page_id /custom_structure/...

1
2 3 4 5
64