Questions tagged [slug]

A slug is a few lowercase words separated by dashes, describing a post and is usually derived from the post title to create a user-friendly (that is readable and without confusing characters) permalink. The post slug substitutes the `%posttitle%` placeholder in a custom permalink structure. A post slug should not be changed and is especially useful if the post title tends to be long or changes frequently.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

What query string parameter is available for index.php, that works for both pages and blog articles?

I have a page /page1 and 2 articles /article1 and /another-article1. Which query string parameter for index.php is available to show the content? I tried: ?p= but index.php?p=page1 is working index....
0
votes
1answer
14 views

A different permalink structure for different categories

My Settings > Permalinks is set to /%category%/%postname%/. Thus blog posts have URLs like example.com/category12/article1. I would like to keep this permalink structure for most articles. Which ...
0
votes
0answers
16 views

Too many redirects (ERR_TOO_MANY_REDIRECTS) only on one page

Everything was working fine but I noticed a slug for a page had a -2 on the end of it and I didn't like it. I found out it was trying to share a URL with an image so I gave the image a new URL and ...
0
votes
0answers
15 views

OK to redirect the root WordPress category slug?

In my new WordPress site, I've started using parent and child categories, so that I've begun to have working links of this sort: https://www.example.com/category/photography/ https://www.example.com/...
0
votes
1answer
26 views

How to have article URL like example.com/article1 and example.com/foo/article2?

By default, blog articles have an URL like example.com/article1. Changing Settings > Permalinks with /%category%/%postname%/ makes it possible to have URL like: example.com/foo/article2 Question: ...
0
votes
0answers
20 views

Add base folder to CPT and 301

I am developing a WP install that is using a third party plugin that interprets searching the data in an unusual way. In short, the rebuild has made the URL structure change for taxonomies, from ...
0
votes
1answer
17 views

Custom rewrite rule based on other custom post type title

I am trying to change url of one custom posts type based on name of the other one. To achieve this. first custom post /test1/aaa the other custom posts aftere rewrite /test1/aaa/123 /test1/aaa/456 /...
0
votes
1answer
40 views

How to get a page slug in WordPress?

I would like to know if anyone knows how I can get the call to a wordpress slug with a wordpress function. All this in order that everything is added automatically in the following way, EXAMPLE: <...
0
votes
1answer
24 views

Wordpress is adding "category" word before my actual category name in url (and this is unsolicited)

Check out this image: This is twenty twenty theme, a default theme. I started facing the problem with a non-default theme, so I switched over to this other theme just for testing, same thing. What's ...
0
votes
0answers
40 views

How Can I Use Equal And Question Mark In Category Slug?

I need to add a question mark and equal the category url. I need this: site.com/stack?exchange=ask But Wordpress does not allow specific characters in url. So i tried to use html encodes in category ...
0
votes
2answers
57 views

Get nice name of category from slug (remove dashes of category)

I have a function in a theme: $category = isset($_GET['category']) ? wp_unslash($_GET['category']) : ''; The problem is that it outputs my categories like this: "test-category" I want, ...
0
votes
0answers
16 views

How to remove category name for only one category?

My current WP config looks like this: in permalink setting Custom Structure set to /%category%/%postname%/ Category base set to . My question is: how to remove category name for only one category IE: ...
0
votes
0answers
25 views

Use custom post type taxonomy between cpt slug and name

I'm building a site for a car dealership and I've created a CPT: Cars and a Custom Taxonomy: Brand Each car has one brand (Obviously), but I want to display them like this: dealership.com/cars/%brand%/...
1
vote
0answers
38 views

How to add a post slug to a url?

For a project i'm working on I try to add the slug of a custom post type to the end of an url. The case: When a user fills out a contact form, the email that gets send needs to have a link to the ...
0
votes
1answer
23 views

Slug for custom post type

I use both pages and blog posts on my site. Pages get the URL example.org/%postname%/, and based on Permalink settings, posts get the URL example.org/blog/%postname%/. Perfect. I have a custom post ...
0
votes
0answers
15 views

Permalinks settings: Post category page keeps redirecting to a page

WP version: 5.7.1 Web server: nginx Plugins: deactivated I am trying to get to a certain permalink structure, that an SEO agency is advising me to use. Looks quite simple, but I can't get it to work. ...
0
votes
0answers
37 views

Choosing the category that's used in the URL slug

So, I have a Wordpress site with a significant back-catalogue of content. We're reducing and flattening our tag structure to reflect a change in the business, less tags, no child tags. Much simpler ...
0
votes
0answers
21 views

Normal page as child of custom post type

I have a website with the custom post type school. I also have normal pages called Presentation, Team and Teachers. What I would like to do is set the pages as children of the custom post type school: ...
0
votes
0answers
12 views

Increase Slug Limit from 28 in Woocommerce [duplicate]

So I need to have longer slug lengths, over the 28 character limit. I tried the filter option available on the previous post for this question with no success. Does anyone have a solution to this ...
0
votes
0answers
27 views

assets aren't loading on a page but loads on others? slug permalink conflict?

Hi does anyone know what could be stopping the assets from loading on 1 page but loads successfully on others? This is a really strange bug. I can't figure out why it's doing it and how to fix. For ...
0
votes
0answers
31 views

How to remove % character from url

I can't remove % characters from my url on wordpress website. There is no % character on my dashboard, but every time I try to copy my post url and into into google, FB or notepade I see a lot of %% ...
0
votes
0answers
49 views

How to prevent wordpress from lowering Capitalized letters

I have the same issue as discussed here - https://stackoverflow.com/questions/4384768/how-can-i-make-capital-letter-upper-case-permalinks/4386225 I made changes to formatting.php like said above. But ...
1
vote
1answer
37 views

Why does wordpress keep adding postname to my CPT's permalink in the end?

Alternate Question: How to change Permalink structure for CPT so that post name comes in the middle of URL instead of in the end eg. /a/%postname%/b/c Any suggestions while changing the permalink ...
1
vote
0answers
30 views

Share same Slug for a Custom Post Type and 2 Taxonomies

I'm trying to achieve an URL structure that implies sharing the same slug ("videos") for a Custom Post Type (video), and two Taxonomies (video_category, video_tag), in order to have: Page: /...
0
votes
0answers
24 views

If Term Name Exists, Append a Unique ID to Slug

How would I go about adding a unique ID to a custom taxonomies slug? We have multiple users who can create their own taxonomies. The problem occurs when two users wish to create a taxonomy of the same ...
0
votes
0answers
40 views

YOAST SEO breadcrumbs URL wrong in post page

I use YOAST SEO for Breadcrumbs in my custom theme. I have the following structure: Home > Category > Subcategory > Single Post. When I am in a Subcategory, breadcrumbs show Home > ...
0
votes
1answer
17 views

Changing search slug from + to - (hyphen)

I've been fiddling with this all day, where I'm trying to change my search function from website.com/s?this%20is%20an%20example to website.com/tag/this-is-an-example to no avail. I have this code in ...
0
votes
0answers
32 views

Check if a page or post url is public or exits

I am new to wordpress and I wanted to know if there is a way to check if a post or page URL in wordpress is public or the url exists. I came across wp_remote_head(url) and to check for the response ...
0
votes
1answer
33 views

How to add a shortcode function that returns the taxonomy slug of the actual post within the loop

Circumstances: I have a CPT called "designs" and a taxonomy related to it, called "project_category" so that I can assign a category to each design. I'm building the template for ...
0
votes
1answer
25 views

Check if parent page has child page of certain slug

I currently have a function that checks to see if the page is a parent, and if so, do stuff. But I also want to check to see if the parent has a child page that has a certain slug. Basically, how ...
2
votes
1answer
50 views

What is the wordpress way of displaying local external content?

I have a somewhat tricky situation. A company's internal server, running some unknown software (means I have no access whatsoever), exports data to my http server via a custom API. This data gets ...
0
votes
0answers
6 views

Custom post type on two pages with different taxonomies but not use the CPT slug

Looking for some advice... I want to have two pages that list posts based around one custom post type (archive-false). For this example I’ve called the CPT: trains. The two pages are called electric ...
1
vote
1answer
53 views

wordpress sub-category ( lowercase letters + non-latin characters ) = 404

If the sub-category's slug is a combination of lowercase letters and Korean, page 404 appears. 1 : NGINX settings location / { try_files $uri $uri/ /index.php?$args; } 2 : Wordpress - Permerlink ...
0
votes
0answers
82 views

For Chinese language how to make WordPress post slug and permalink as like as the post title?

For the Chinese language, WordPress permalink and slug are not readable. It converted to ASCII. Is there a way to make permalink and slug as like as the post title?
0
votes
1answer
26 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
1answer
110 views

What is an equivalent of single_cat_title for getting the slug of the category?

I searched for something like single_cat_slug but I did not find something relevant. All I don't know how to do it is to find the slug, not the name, of the currently opened category page. I do not ...
0
votes
0answers
21 views

Load Dynamic Template Page by Metabox

Does anyone know how I can implement Wordpress as shown in the image below? I would like to have a unique url passing the company_name metabox as a parameter and from business_type create a function ...
1
vote
0answers
34 views

Allow Chinese character on post URL slug

When I create a post I can't set the permalink with custom non Latin character, when I insert Chinese character on url slug it will automatically disappear after onblur the input text. Is there any ...
0
votes
0answers
20 views

Wordpress URL auto correct returns pages from a different category. Can this be changed?

I have categories set to be part of the url and there are pages that start with the same slug but in different categories. /category-A/123-hello-world /category-B/123-some-longer-slug-here If a url is ...
1
vote
1answer
18 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
22 views

Wordpress pagination URL

How to get a similar kind of pagination URL in Wordpress? In both the URL you can see 'Faculty' which you cannot achieve in default Wordpress I guess. Listing page: https://engineering.jhu.edu/...
0
votes
2answers
28 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 ...
0
votes
0answers
21 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. ...
1
vote
1answer
35 views

How can I increase the length for the taxonomy term slug?

I am trying to create a new term in topic taxonomy. Since I am writing in Bangla Unicode instead of English, the slug is created with lesser/broken text. Is there any hook to update the length for the ...
0
votes
0answers
12 views

Output Term List and Respective Term Slug from Multiple Taxonomies

Complete original code renders 'category' terms with link. My modifications to the original renders 'category' terms with link but does not link out parent nor children of 'genre' (they render okay). ...
0
votes
0answers
16 views

How can I rename a custom field group?

I want to rename the "password managers".
0
votes
0answers
6 views

Rewrite post URL based on query vars

The idea is this Let say I have this URL: https://example.com/page-generator And depending on the query_var I attach to it I could show one page or another For example lets say we have created already ...
0
votes
0answers
8 views

Corrections for url rewrite

function wp_change_link( $permalink, $post ) { if( $post->post_type == 'post_type' ) { $resource_terms = get_the_terms( $post, 'custom_tax' ); $term_slug = ''; if( ! ...
0
votes
0answers
34 views

Check for the existence of term slug

I need to check term slug, if slug do not have, not display: if(is_tax()){ $permalink = get_home_url() ."/category" . '/' .$term_slug . '/' .$post->post_name; }else{ $permalink = ...
1
vote
1answer
23 views

Custom permalinks in Wordpress

I have a question about permalinks that has me crazy because I have not found a solution for a long time 🙁 So I turn to the wisdom of the hive mind to see if it sheds some light on me. I have my ...

1
2 3 4 5
15