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.

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

How to fix 404 error when using SEO URLs with htaccess rewrite rule

I have pages in root directory/pages pages like object.php On these pages I get seo_url via GET and in the script on the object.php page I search for this seo_url and get the id for it via a database ...
Михаил Горячев's user avatar
0 votes
2 answers
65 views

Svelte goto using slug

I'm using svelte for a personnal project and i'm wondering if someone has the trick to do that. I've a list of blog pages and for each pages i've a next_page and previous_page url The problem is: from ...
Samuel Pelsy's user avatar
-1 votes
1 answer
19 views

Shop slug is being taken up by a ghost page or category that makes /shop link directly to a product in my shop

I am making my first online shop site, and ive run into a problem with my /shop slug being taken up by a page or category that i cannot find. When going to the /shop i am taken to a page with ...
user22479057's user avatar
0 votes
0 answers
19 views

Typo3 10.4 TCA Slug

I created my extension with this TCA Slug configuration (equal to UID) : In backend , when i create a new object, the field slug is not correctly populated. I solved this problem by a Hook ($GLOBALS['...
Stefano Danieli's user avatar
0 votes
0 answers
16 views

How to make slug field unique per language

On symfony 6.2, I am using DoctrineExtensions package for slug generation. For translation, I am using KNP DoctrineBehaviors. The generated slug (based on the title field) should be unique but only ...
Vénizia's user avatar
  • 581
0 votes
0 answers
39 views

Livewire Routes Slug Parameter with wrong url generate automatically when using Pagination

I have problems with pagination using livewire. If I use Livewire Pagination without parameter on Routes like this : Route::get('/listNews', ListNews::class); It works just fine, for the URL given : ...
idproperti's user avatar
0 votes
0 answers
24 views

Open ListView with foreignkey from anotherlist view using a slug in django

I was able to do basically what this article - link - says, and in the comments the person says that it would be beneficial to use a slug. How would I go about implementing the above article but with ...
Bennettlol's user avatar
0 votes
1 answer
51 views

How to implement slug in laravel

I am having a problem how to display slug data in view file i am using cviebrock/eloquent-sluggable Model: use Sluggable; public function sluggable() { return ['slug'=>[ 'source'=>'...
Mohaila Tlaba's user avatar
0 votes
0 answers
27 views

How to open a post through a slack link using laravel

i am new in laravel working on a posting project, everything is working fine the post is displayed in a required way except that i want the user to view a post by clicking on a title which direct him/...
Mohaila Tlaba's user avatar
0 votes
1 answer
63 views

Getting the slug info of a dynamic page without useRouter in nextJS

I'm trying to create two constants that contain the slug information from my dynamic page, but apparently useRouter from next/router has been thrown out of nextJS support. Would any of you know how to ...
Rick's user avatar
  • 11
0 votes
0 answers
29 views

django slugify thailand umlauts

i need to create Thai language slug but after i use slugify not working Models.py from django.utils.text import slugify title = models.CharField(max_length=80,unique=True) slug = models.SlugField(...
ChoCoBall ThreeTime's user avatar
1 vote
2 answers
122 views

How to calculate slug with URL segment of parent object?

I would like to calculate the slug automatically by using the parent object. Like with the pages where the parent pages are part of the slug. In my extension I have an object hierarchy like 'journal' &...
Stefan Padberg's user avatar
0 votes
0 answers
84 views

PHP dynamic URL slugs with multiple languages

I am trying to create PHP pages with SEO-friendly slugs like so: www.example.com/italian-foods www.example.com/de/italienisches-essen www.example.com/it/cibo-italiano Links are created with php-i18n ...
Fid's user avatar
  • 462
0 votes
1 answer
58 views

Why is my WordPress filter with AJAX not working with Arabic slugs in categories?

i have code to filter products with ajax in wordpress but when create a category with Arabic slug filter doesnt work.it works correctly with English slugs.how can i fix this? help to fix this for ...
meroto midas's user avatar
0 votes
0 answers
12 views

wordpress duplicate slugs only when setting parent page

I am currently setting up a wordpress blog. Everything is working fine but I am now having issues with duplicate slugs that have never existed before. I have set up a parent page called laos (/laos). ...
AidanGregory's user avatar
1 vote
3 answers
95 views

Truncating a slug to maximum length by removing delimited words from the middle of string

I am trying to ensure that a slug formatted string is within the total character limit by removing words from the middle of the string if warranted. Sample slug: '/job/hello-this-is-my-job-posting-for-...
David Pham's user avatar
0 votes
0 answers
29 views

Changing slug as subdomain on htaccess

I have some problem on changing the slug url as subdomain the example domain.com/manifest So i want to everyone can access on subdomain taken from slug with all assets on that slug manifest.domain....
Ukazza's user avatar
  • 1
1 vote
3 answers
2k views

Next.js UseRouter not mounted

I'm using Next.JS and i want to pass a slug to my site. This is the code that i have: 'use client'; import { useRouter } from 'next/router'; export default function Home() { const router = ...
Eatenpancreas's user avatar
0 votes
0 answers
8 views

In WordPress, how do you have a hyphenated and non-hyphenated slug lead to the same page?

On WordPress, how do I adjust the permalink or the slug values so that, say (using a fictitious site path), plants.com/floweringdogwood and plants.com/flowering-dogwood will each land on plants.com/...
Justin Beaton's user avatar
0 votes
0 answers
17 views

I am not able to edit post URL

After writing a new article when I am going to edit the URl name it is not happening and taking a RL name by default. I'm using wordpress and Rank Math Plugin. I've tried all possible changes like ...
rajdeep roy's user avatar
-2 votes
1 answer
59 views

TYPO3 11.5 changed slug ends in wrong redirect

TYPO3 11.5.26. I have had two pages called "test" in the page tree: page type=folder id=34 slug=test page type=standard id=10 slug=test1 Then I did rename the slug for 1 into 'test-folder' ...
Franz Holzinger's user avatar
0 votes
0 answers
156 views

How to remove parent pages from child slugs on WordPress without a plugin?

Say I have pages like this: example.org/parent example.org/parent/child-one example.org/parent/child-two I would want to take Child Two and make the url just example.org/child-two without the ...
radicitus's user avatar
0 votes
0 answers
122 views

Is slug is working in next export command in next js?

I know The next export command generates a static HTML version of your Next.js application. But when i use slug in my project and build my app check in live the page is blank. i want knowledge about ...
Ai9398's user avatar
  • 33
0 votes
0 answers
18 views

Wordpress URL with hierarchial taxonomies

I have a little problem with a hierarchial taxonomy in Wordpress. Let me give you an example. I have a taxonomy with the name "Locations". It has multiple "sub" taxonomies like, ...
SevenTwo's user avatar
-2 votes
2 answers
187 views

I'm unable to get the id from the JSON object in Next Js API

data.js inside API folder export default { Trending : [ { "data":[ { "id":1, ...
Preethi's user avatar
0 votes
0 answers
55 views

Limit the size of existing permalink slugs only on specific custom post type in Wordpress for SEO

Below are the codes i found on: Limit the size of the existing and new permalink slugs in Wordpress for SEO which were very helpful but i still need a little further help please. CODE 1 below: Help ...
Orvitips's user avatar
0 votes
1 answer
413 views

Axios get slug from Strapi.io BlogPosts gives 404 - NextJS / Typescript

So the thing is I am trying to render a blog page with having strapi on the side as the backend cms. I have [slug].tsx which is the file that retrieves the data for the page, which correctly worked ...
BartMolk's user avatar
1 vote
2 answers
151 views

Laravel set slug attribute

am trying to automatically set first name and last name to slug on store and update. but am getting error: General error: 1364 Field 'slug' doesn't have a default value. I have this in the model, what ...
user avatar
0 votes
0 answers
33 views

How to make Django slugify not duplicate with Unicode strings?

So basically it works fine, but it creates duplicates of slug for some reason class News_Tag(models.Model): title = models.CharField(max_length=150) slug = models.SlugField(null=True, blank=...
Ruslan Developer's user avatar
1 vote
1 answer
97 views

How to create unique slugs from unique integers?

I have a table of entities and each has an ID identity column which is a simple incrementing integer, guaranteed to be unique per entity. How can I create relatively short (preferably 10 characters ...
Jez's user avatar
  • 28k
0 votes
1 answer
821 views

Undefined array key slug

This is the error that shows up on the header area: : Undefined array key "slug" in on line : Undefined array key "slug" in on line : Undefined array key "slug" in on ...
Awaken The Greatness Within's user avatar
0 votes
1 answer
120 views

wordpress - check if slug exists with AJAX

I would like to check from the user interface if a slug url already exists. I naturally turned to an AJAX solution like this. `jQuery("#slugBrut").keyup(function() { var slugBrutText ...
Jean-Pierre TR's user avatar
0 votes
0 answers
25 views

Re-writing slugs to be prepended by word and hyphen

I'm working with a function in wordpress (though this isn't necessarily wordpress specific). WP won't allow slugs more than 20 characters long so I'm trying to work with a function that will do what I ...
Geoff_S's user avatar
  • 4,927
0 votes
0 answers
29 views

How to make page a child page in url slug in html website?

So I just made a video game website where I put my online games on it but I want the video game's page link to be under a separate slug: website.com/video-games/mygame instead of website.com/mygame, ...
IanMayto's user avatar
0 votes
0 answers
35 views

Removing custom post type name from permalink

There are numerous threads on this, however, none of them seem to resolve the issue for me. Background I have a custom post type called "Landing pages", which has been registered like this: ...
Freddy's user avatar
  • 693
0 votes
0 answers
508 views

SvelteKit: slug-parameters get mixed up with media-path

I work on a project, where I want to implement dynamic routing. I use multiple slug-parameters like number of article and author. Example: blog.com/posts/johnson/12 On the 'posts'-page I get the ...
jis3r's user avatar
  • 1
0 votes
2 answers
783 views

How to convert symfony gedmo annotation to PHP 8 Attributes

I'm working on Symfony 6 PHP 8 project and i'm using gedmo doctrine extension . I can't find a full documentation about converting gedmo annotation to PHP 8 Attributes. I'm tring to convert like this ...
Khaled Boussoffara's user avatar
0 votes
1 answer
754 views

Slug returns Reverse for '' with arguments '('',)' not found. 1 pattern(s)

I am trying to make it so when I view a blog from any particular link on my website, the url displays www.example.com/view-blog/slug. I have got it working for my images and image title. But I cannot ...
David Henson's user avatar
1 vote
1 answer
438 views

Cannot read properties of undefined (reading 'current') I can't get slug from array

current page not displayed I can't get current slug from array stack: backend: Sanity Frontend: Astro.build Sanity import { defineField, defineType } from 'sanity' export default defineType({ ...
Create and Choose's user avatar
0 votes
0 answers
47 views

How to use custom permalink for products in wordpress/woocommerce?

How to use custom permalink for products in wordpress/woocommerce? Is there any ready solution? I managed to change: /product/cabinet-with-handle-white-2/ on /cabinet-with-handle-white-2.html and ...
Jakub Zajączkowski's user avatar
1 vote
1 answer
186 views

Slugs not appearing in URLS

I want my slugs to show up in my URLS instead of the number ID of the image that is being viewed. I can't seem to get it working. Can anyone spot what I'm missing/doing wrong? TYIA models.py: class ...
David Henson's user avatar
0 votes
0 answers
38 views

Retrieving the URL using PHP and preventing cross-site scripting attacks

I am trying to create a webpage that has a blog post and multiple links (related topics) to other blog posts. When a user clicks on any of these links, a new blog post should open and the URL should ...
Arnab Sarkar's user avatar
0 votes
0 answers
87 views

Rewrite LearnDash Wordpress(WP) Permalinks

I've looked through a bunch of similar questions and can't seem to find an answer for my circumstances. I have LearnDash(LD) installed on my WP site and the default permalinks that it shows are as ...
iamgroot's user avatar
0 votes
1 answer
244 views

How to autofill user and slug fields in django form

I need two of the three form fields to be filled in automatically before submitting to the database. Slug is supposed to be filled based on test_name, and user have to be filled based on data about ...
lightfly's user avatar
1 vote
1 answer
107 views

Django Template changing html attribute based on slug and current request

When I tried to iterate through a list of post titles to create links in a django template the urls never match the requested path (matching the current web page should alter the formatting on the ...
jmendes16's user avatar
0 votes
0 answers
107 views

Rewrite category slug in wordpress not working

Been looking to get a rewrite og a category slug in wordpress to work and found this code and some similar ones one the net... I have a category named "lyrics" I want to rewrite to something ...
Michael Bragt's user avatar
0 votes
1 answer
284 views

How to filter objects by value of one of its fields in django?

I have django application with urls.py: path('<str:slug>/', views.article), When user types name of product in my website, the view is triggered: def article(request, slug): videos = models....
kurac's user avatar
  • 28
0 votes
1 answer
212 views

Wordpress BODY class - add page slug as body class AND make it the first class

The standard 'Add page slug as body class' function page is good. How to make the class(es) appear first in the list displayed in the body tag? E.g. Currently: <body class="page-template page-...
Adam Fletcher's user avatar
0 votes
0 answers
184 views

Next + strapi dynamic homepage don't show up

I have problem with displaying hompage on my site. When I enter page with slug e.g. /blog everything works fine, but problem occurs when I want to go to homepage, then website displays: This page isn’...
w1ktor's user avatar
  • 1
-1 votes
1 answer
469 views

Keep original string language in laravel slug

With laravel(I am using v.9.x) Str:slug you can convert a string to a slug like: Woman life freedom to Woman-life-freedom but the problem is when you pass a non-english string to this method, ...
Pooya Behravesh's user avatar

1
2 3 4 5
26