How to make permalinks to posts in hexademical (like site.com/?p=11 to example.com/0x000b)?
Leave a Reply
You must be logged in to post a comment.
How to make permalinks to posts in hexademical (like site.com/?p=11 to example.com/0x000b)?
You must be logged in to post a comment.
I gues you can create a plugin to intercept the request when saving a post and then change the post_name to hex(post->id).
Just hook it the the save_post event. Not sure that is the correct name.
VeroLom, the function you’re looking for is add_rewrite_tag() that would let you register a new
%hexcode%
tag that could then be used in your permalinks structure just like%postname%
. Reference links:Cheers!