Questions tagged [slug]

part of a URL that makes it more human readable or SEO-friendly, but without necessarily being required by the web server.

A slug is a part of a URL that makes it more human readable or SEO-friendly, but without necessarily being required by the web server. Slugs can be generated from a page title and are typically the last part of the url.

Example:

  • Page Title: c# - What's the difference between String and string? - Stack Overflow
  • Slug: whats-the-difference-between-string-and-string

The full URL including the slug is https://stackoverflow.com/questions/7074/whats-the-difference-between-string-and-string. Note that punctuation in the url is typically removed.

1272 questions
-1
votes
2 answers

How to override the slug of ultimate member profile page?

I want to change the default firstname-lastname slug to something different, like firstname-lastname-city-category. How exactly can I do this using ultimate members plugin ? I am using free version. I could not find any filter for this so far ? Any…
Saad
  • 21
  • 1
  • 7
-1
votes
2 answers

Unique Profile Slug with PHP and PDO

I am using a class to generate a string name profile to slug and next use an SQL command to tell me whats the unique value to use in insert command, the problem is the command isn't working properly, sometimes it is possible to return a value which…
Sophie
  • 410
  • 3
  • 10
-1
votes
1 answer

how to auto-populate slug field in django forms

i want to allow users of a website create blog post from a form that i made, but the slug field does not get populated automatically from the frontend but from the backend (admin page) it does get populated, and that is not what i want. I want the…
-1
votes
1 answer

getting url slug django

i am wanna get url slug to show selected category by user on breadcumb. how can i get it? i found only wordpress and php solves. template
-1
votes
1 answer

NextJs toruble to get big string from router.query

I have link like this! `http://localhost:3000/admin/useractivation/mssh@gmail.com/%ecF%0d%e8%7c%8e%f9%2cD%f2%8ea%3b%07D%b2%7b%05%e6S%18cm_K%83%98%1f%b9%1c%ad%89N4%d3%e0%d9%1c%ba%8f%0aE%27%c2*-M%d6%05%cf%06%e4%d5%d8%07%3d%e6%08k4%be%fb%c5! I'am…
-1
votes
1 answer

How to use slugs in routes

Is there a way to use slugs in my routes like instead domain/technicalInformation it would be domain/technical-information. Thank You! PagesController.php class PagesController extends Controller { public function technicalInformation(){ …
Play Free
  • 93
  • 1
  • 11
-1
votes
1 answer

After updating the post, I want the user to be redirected to the post (Django - Python)

I want the user to be able to update existing posts. When the user clicks Update, then Post, they get an error message saying there is no URL to direct to. But the post does get updated on the backend. I thought the line return…
Ross Symonds
  • 690
  • 1
  • 8
  • 29
-1
votes
1 answer

How to use Yii2 Sluggable Behavior without showing id number?

I have read the question on using SluggableBehavior in Yii2 and in my trial case I can generate url like article/1/First-Article using the rule in urlManager 'article//' => 'article/view', and…
J S
  • 21
  • 4
-1
votes
1 answer

How to create SEO friendly URLs with category/subcategories/article slug in angular project?

I am using Angular 8 Version to create a news app. I need to display the link like this: www.domain.com/category/category/title and www.domain.com/category. How can I achieve this? Thanks
-1
votes
1 answer

Match a slug with Nom

I've been trying for some time to find a decent solution for Nom to recognize the slug as an alpha1. So I could parse something like this fn parse<'a>(text: &'a str) -> IResult<&'a str, &'a str> { delimited(char(':'), slug,…
HelloEdit
  • 64
  • 2
  • 8
-1
votes
1 answer

Wordpress: subcategory is subtracted from slug if parent category is checked

I have the following category hierarchy: -Cat --SubCat ---SubSubCat When creating an post and mark it only in the subsubcat category, the correct slug is generated: www.example.com/cat/subcat/subsubcat/post-title When creating an post and mark it…
BobGCA2
  • 125
  • 10
-1
votes
1 answer

How does Wordpress create slugs?

I am writing a script to import posts from a CSV file, but I need to generate a slug from the data source in order to query Wordpress to see if the post already exists, how does Wordpress generate the slugs? I will need to generate the slugs in the…
Elliott Coe
  • 543
  • 3
  • 6
  • 18
-1
votes
1 answer

String replace to replace spaces and maintain dash

I am trying to convert: " Long Grain IRRI-6 White Rice " to " long_grain_irri_6_white_rice " but it's returning this " long_grain_irri-6_white_rice " Here is the code: public function phpslug($string){ $slug = preg_replace('/[^a-z0-9-]+/',…
Zain Shabir
  • 395
  • 6
  • 18
-1
votes
1 answer

Wordpress // remove post type slug for URL

I have created a CPT and several custom taxonomies applied to this CPT. At the moment my URL are as follow (using a plugin) : www.example.com/[cpt]/[taxonomy-term]/post For a specific cpt, I'd like to move to…
Fabien
  • 59
  • 8
-1
votes
1 answer

order of matching regex in named group urls in django

I'm making a blogging website with django. I'm making use of slug to identify a particular article. I'm making these blogs for 3 different fields namely sketches, cakes, and rangolis. But the problem here is, the regex of slug for urls of these…
user10058776
  • 183
  • 1
  • 3
  • 17