Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
14 views

How to add rewrite rule to custom post type with parent in url with cpt ui?

I'm trying to create custom post types but i need the posts of custom post type to have the url along with parent category. Example for now i have custom post types science, tech, business. The url of ...
0
votes
0answers
32 views

Need Help with .htaccess to Make Pretty Permalinks Work

I am in a huge problem where my blog is being redirected to 404 error page when I use %postname% permalink but %plain% permalink works fine. Let me tell, I have made a custom theme for my WordPress ...
0
votes
1answer
26 views

Custom post type slug 404

I have created a custom post type public function register_post_types() { $args = array( 'labels' => array( 'name' => 'Android Apps', 'singular_name' => '...
0
votes
0answers
18 views

How to change permalink as postid when the default setting is set as /%category%/%postname%/

Anyone know how to change value of %postname% for permalink setting? I'm making my site permalink as [domain/%category%/%postname%/] , but it effect to the current post's permalink. The current post'...
-1
votes
3answers
16 views

Can't find permalinks section under “Settings”?

I just signed up for a free account. I found a few tutorials on how to set the permalinks but I don't see that under my own dashboard: I need to turn on Pretty Permalinks so that I can visit /wp-json/...
0
votes
2answers
29 views

How to change the link structure of the homepage?

There are "your last posts" on the homepage. Under normal circumstances, the page proceeds as follows: http://example.com/page/1 http://example.com/page/2 e.t.c I want to change this link structure....
0
votes
0answers
5 views

Permalinks do not work after Cloning a page [closed]

Please how can I fix my permalinks after cloning a page on my site I have changed the permalink options but its still not working
0
votes
1answer
31 views

Custom permalink not working and showing 404 page not error

I have created 1 custom post and some custom fields. Custom post type: Tour Custom field: tour_id Now I want to customize permalink link structure, want to append "tour_id" value in link. I'm ...
0
votes
1answer
15 views

how do prevent wordpress from creating permalinks for media files

Could one please explain how can I prevent WordPress 4.9 from creating permalinks/slugs for Media files without the need of installing another plugin? It's also important that the solution won't get ...
0
votes
1answer
13 views

Permalink misbehaving in Custom Post Types

I have a post type named careers which is, function do_careers() { register_post_type('Careers', array( 'labels' => array( 'name' => 'Careers', 'singular_name' => '...
1
vote
1answer
30 views

Custom post type as home page with custom url

I've changed the permalinks to add a string at the beginning of the url like this: /london/%postname%/ This works perfect for all the pages but not for my home page. I set my home page to be a single ...
0
votes
1answer
31 views

How to change URL structure for custom post type in wordpress? Custom taxonomy + custom Post name

I want to change the url structure for custom post type post type --> movies This url structure sitename.com/movies/post-name need to change sitename.com/custom-taxonomy/movies/post-name /%...
0
votes
2answers
27 views

Question About Permalink in wordpress

I have chosen single theme in Wordpress for website and onsite blog. I want to set permalink in two different way one for websites page(like abc.in/xyx) and other for onsite blog(like abc.in/blog/...
0
votes
1answer
12 views

how to alter permalink in wordpress?

I have created a wordpress page and url is /demo-abcde and after saving I need to change it to /demo But unable to find a way to edit the link and change it.
-1
votes
0answers
21 views

question mark in url like author/someName/?profile-section=

What is the best way to remove a question mark in url like author/someName/?profile-section=pm , settings etc
0
votes
0answers
7 views

Sub Nev Menu for Specific Page and categories?

As you can see in this image I have a main nev menu that contains (HOME and GTA SAN ANDREAS), GTA SAN ANDREAS is a page, where i have attached that sub nev menu (Buses, Bikes...) as a hook content. ...
0
votes
0answers
15 views

How can I change the header logo for different page permalinks

I need to change the logo in the header of the Januas theme depending on the permalink of the page being displayed. I looked at using conditional tags but ran into the problem that the theme uses ...
0
votes
1answer
38 views

Custom Post Type permalink without /%day%/ and/or /%postname%/

In my theme I've created a new Custom Post Type webinar. As we only post 1 webinar per month, we would like to use the permalink structure - /webinar/%year%/%monthnum%/ where we don't use /%day%/ ...
0
votes
1answer
21 views

Remove a link from a page ID used within an array [closed]

I've the code as below: <div class="row"> <?php $pages = array(54,55,56,57,58,74,75,76,77,78); $i = 1; foreach ($pages as $page) { ...
0
votes
0answers
35 views

get_permalink() is not working after published

I created a plugin that, when updated, gets a link to a published record and sends it to the API. So I get the URL, but sometimes wordpress gives me such a link: site.com/?p=123, and should site.com/...
2
votes
1answer
35 views

Flush Rewrite Rules on init or rest_api_init?

if I'm using the REST API to create endpoints in my plugin, should I be flushing rewrite rules on init or in rest_api_init? I realize that it should be done on plugin activation/deactivation. However,...
0
votes
0answers
14 views

404 on Woocommerce Category Pages, Permalink settings seem correct?

I've looked at the other answers to this issue and they don't appear to quite match my problem. My product and category pages work fine with my current Permalinks. EXCEPT one category, Furniture, and ...
0
votes
1answer
25 views

Why does /wp-json/ not work on the “plain” permalink structure?

I'm given this error: https://image.prntscr.com/image/yUjTXILmQR6lbpAFIb2CyA.png When trying to access http://127.0.0.1/wordpress/wp-json/wp/v2/posts/ but if I change my permalink structure to "Day ...
0
votes
0answers
20 views

Custom Post Type Loading 404 Page With Category in the URL

I have set a Custom Post Type using the following code: add_action( 'init', 'wpshout_register_major' ); function wpshout_register_major() { $args = array( 'public' => true, '...
1
vote
1answer
21 views

CPT Post Title Permalink: Replace “@” (or all special characters) with dash “-” instead of just removing

I have Custom Post Type "Email", where the Post Title is always going to be an email address, ie: example@domain.com The problem I am having is the "@" is being removed in the permalink: ../...
0
votes
0answers
17 views

More than one custom post types rewrite rule start with same word permalink not working!

I have created pressreleases,whitepapers two post types using the below code. 1) add_action( ‘init’, ‘create_pressrelease’ ); function create_pressrelease() { register_post_type( ‘pressreleases’, ...
7
votes
2answers
560 views

How can I get the privacy policy page?

After the update regarding the GDPR, WordPress now has an option named "Privacy Policy" under the settings, which you can use a page to be used as your privacy policy page. How can I get the ID or ...
1
vote
1answer
45 views

Customize Custom Post Type URL

Actually I needs to change the structure of my urls for the custom post type ( I also want to customise taxonomy url but only targeting post for this question to avoid confusion) My custom post type ...
0
votes
0answers
14 views

Wordpress Site URL is added to external links

So my website, What If? HQ, is made with wordpress. Resources load fine on it, however if you click on the twitter link on the mobile site, and if I specify a font resource that is not local via css, ...
0
votes
0answers
14 views

Rewrite URLs for CPT in domain.com/[archive]/?[query_var]=%post_id% format

I've tried unsuccessfully to change the permalinks for a 'client' CPT to be like this... //domain.com/clients/?client_id=123 However, the closest I've gotten is... //domain.com/?client_id=test-...
1
vote
1answer
18 views

Change permalinks of custom post type 'question' as post id or any random number once

I need to display questions like this from quizzes/quiz-1/question-1 to quizzes/quiz-1/%question-post-id%/ I have changed $permalink = $permalink . $question_id; but it does not work. Any help would ...
0
votes
2answers
21 views

custom query var NOT working on a plain permalink: http://10.8.10.9/?page_id=1774/?location=968&floor=1

I used to have a working custom query for location on this local link: http://website.local/catalogue/?location=968&floor=1 but, the server that I had to move to (Linux) it appears that is not ...
0
votes
1answer
33 views

I've removed my /author/ slug but it clashes with new and existing pages. Any fixes?

I've successfully removed my author slug using this tutorial: https://wp-snippet.com/snippets/remove-author-prefix-from-slug/ so it's like website.com/author/cixxy to website.com/cixxy My question ...
-1
votes
1answer
43 views

Relative links in Gutenberg

I'm developing a site on my local machine and am now adding the content that I want to go live with. But I noticed that when I add a link in the new Gutenberg editor, the link is absolute, e.g. it's ...
0
votes
1answer
25 views

Display a custom slug in URL depending on user variable

Sorry if this has been asked - I haven't figured out how to search it in a way that leads me where I want to go. We have a client who wants a site built that represents four geographical areas and so ...
0
votes
1answer
22 views

Redirecting “wrong” but working links to their canonical URL in order to prevent search engine penalties (e.g. /123/ at the end of URLs)

The WordPress permalink system is really nice as it even detects minor problems with URLs and is loading the correct page. For example we have a page with an URL like this: http://www.example.com/...
3
votes
1answer
122 views

'publicly_queryable' => false not working as expected for custom post_type

I have a custom post_type that I registered with the following settings: 'labels' => piklist('post_type_labels', 'Tattooer') ,'title' => __('Enter the name of the tattooer') ,'supports' =&...
0
votes
0answers
22 views

Remove trailing slash when WP_CACHE is enabled

I removed the trailing slash via Settings > Permalinks for my WP site. All URLs have been indexed by Google without the trailing slash so I don't want to revert this change. I just wanted to enable ...
0
votes
0answers
22 views

How can I fix 404 errors after csv import of job posts?

I have used WP All Import to import a csv file with 610 job posts. All the jobs load into the site but when I click on the jobs in the front end of the site from the jobs listing page i get a 404 ...
3
votes
2answers
132 views

custom permalinks for category archive ( custom base and no parent slug )

For the default taxonomy i.e category , I want custom permalinks with i) base = "post/c" and ii) without any parent slug For eg: if I have categories cat-a subcat-a1 subcat-a2 cat-b ...
0
votes
1answer
20 views

How to flush Global query variables in wordpress?

I am using add_rewrite_rule() to show child posts for parent post. add_action( 'init', 'my_add_rewrite_rules' ); function my_add_rewrite_rules() { add_rewrite_rule('^child/([^/]+)/?','index.php?...
1
vote
0answers
19 views

How to set permalink to fetch all children custom posts with parent post in wordpress?

I create parent-child relationship for custom posts types. Generic : www.example.com/parent/parent_post Sample : www.example.com/projects/project-one In above URL parent is a custom post ...
0
votes
1answer
32 views

Logging in to installation in subdirectory renders broken dashboard (no CSS, broken links)

I have my normal HTML/CSS on my root folder and Wordpress installed in a subfolder (domain.com/subfolder). When I log into my wp-admin subfolder as admin, it directs me to a dashboard page which ...
3
votes
1answer
65 views

How do I use the same post slug for different Categories?

I want to use the same post slug for different categories. Because I will have different projects with the same slug. I already have the post slug email. The second slug email becomes email-2, but I ...
1
vote
0answers
25 views

Have different permalinks based on category

I am building my blog, but I want the permalinks to have different structure depending on the categories. Example: cat1 and cat2 are blogs and the permalink should be: domain.com/postname with my ...
0
votes
0answers
10 views

Permalink settings breaking on one specific site in multisite

We have a WordPress site that's a fairly active multisite that has four active sites, all part of the same organization but "sub-organizations" under the same organization. Largely it works fine, but ...
0
votes
0answers
27 views

Taxonomy Term Child Returning 404?

first post. I'm at a lose end with this and I just cannot get it to work at all. The general jist is that I've created a custom post type named 'Product'. I've also created a Taxonomy named 'Types' (...
1
vote
1answer
28 views

WordPress permalinks that end with a hyphen result in a 404

I have a series of URLs where the permalink ends with a hyphen. They come from a previous CMS where this apparently wasn't an issue, but in WordPress they result in a 404. I'm noticing that when I ...
0
votes
2answers
41 views

Custom permalink structure for posts in certain categories

As the title says, I want to create a different permalink structure for posts belonging to a certain category, in my case, the name is "ICO". I've found this piece of code on StackExchange, but it ...
0
votes
0answers
16 views

Wordpress redirect to permalink

I have a wordpress where I tried to recreate something from another site I created a while ago. The old site is (after all the updates) still working absolutely fine. One part is a selfcoded ...