Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

slug

How do I retrieve the slug of the current page?

August 4, 2022August 3, 2022 by Magenaut

I am trying to retrieve the slug of the current WordPress page outside the loop. The title of the page returns with wp_title (), but how can I get the slug?

Categories Q&A, Wordpress Tags post-meta, slug Leave a comment

Regenerate Slugs From Title of Posts

August 4, 2022August 3, 2022 by Magenaut

is it possible to regenerate the slugs programmatically after changing the titles of the post? Numerous post titles were updated and the slug was not updated with the title so I need to regenerate all these slugs.

Categories Q&A, Wordpress Tags get-posts, slug Leave a comment

Rename files during upload using variables

August 4, 2022August 3, 2022 by Magenaut

I’d like to rename files during upload and set their names to the post slug the files are being attached to, plus some random characters (a simple incremental counter will de just fine) to make the filenames different.

Categories Q&A, Wordpress Tags slug, uploads Leave a comment

How to add dot(“.”) in post slug

August 4, 2022August 3, 2022 by Magenaut

How to add dot(.) in post slugs?

Categories Q&A, Wordpress Tags slug, url-rewriting Leave a comment

Redeclare/Change Slug of a Plugin’s Custom Post Type

August 4, 2022August 3, 2022 by Magenaut

Is it possible to redeclare/change the slug of a plugin’s existing custom post type (without simply editing the plugin)?

Categories Q&A, Wordpress Tags custom-post-types, functions, slug Leave a comment

Can I use a number for a post/page slug?

August 4, 2022August 3, 2022 by Magenaut

Is it possible to use a number for a post/page slug? I have tried to use e.g. ‘123’ for my page slug, but each time WordPress converts it to ‘123-2’.

Categories Q&A, Wordpress Tags slug Leave a comment

Change author base slug for different roles

August 4, 2022August 3, 2022 by Magenaut

Is it possible to change the author base slug according to his role? For example, authors get example.com/ninja/%username% and subscribers get example.com/trainee/%username%?

Categories Q&A, Wordpress Tags slug, url-rewriting, user-roles Leave a comment

custom htaccess rewrite rule for page

August 4, 2022August 3, 2022 by Magenaut

i have a page in wordpress called “video”. its page id is 6, and its slug is “video”

Categories Q&A, Wordpress Tags htaccess, slug, url-rewriting, urls Leave a comment

how to get page id of a page using page slug

August 4, 2022August 3, 2022 by Magenaut

I’m pretty new to WordPress and I was wondering if I could get a page id with its slug. Is it possible please let me know?

Categories Q&A, Wordpress Tags id, php, slug Leave a comment

Theme localization of “slugs” (custom post types, taxonomies)

August 4, 2022August 3, 2022 by Magenaut

in my theme I want to define a series of custom post types and custom taxonomies, each one having its own customized slug; the base language of my theme is english, therefore the slugs will be in English language

Categories Q&A, Wordpress Tags custom-post-types, custom-taxonomy, localization, slug, translation Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Page4 Page5 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress