How can I add custom PHP code below the the permalink field in Admin Dashboard post edit page?

[ad_1]

I’ve been trying to figure this out but the nomenclature isn’t that intuitive. What I mean is when I google for “**how to edit the admin area**” or “**how to customize the admin dashboard**” most of the results are having to do with using a white label plugin, but ***I’m trying to do this with code*** (lol, yes usually I’m asking for a plugin, but this time I thought it’d be pretty simple to code it myself)

So, it should look like:

Permalink:
ID Link:

​

[Admin Dashboard post editor content area showing where I want to add the permalink])

​

I don’t know if this is metabox related or not, but it might be

## What I’ve Tried Already:

I found [\[this old WEBFX\]]) post and surprisingly, all of the code snippets still work! Unfortunately, it is mostly about removing things and nothing that applies directly to my task

Somehow I got ahold of the idea that maybe I’m trying to add a metabox, and found [\[this Smashing Magazine post from 2011\]]). It seems like overkill for what I’m trying to do

I continued to follow the metabox route — mind you, I looked at the WordPress codex and it is lacking in multiple examples of use cases for functions like unregister\_widget, remove\_meta\_box, etc.

## References:

Here are some other resources that looked promising, but wasn’t quite what I was after:

* [https://www.youtube.com/watch?v=yTDE6pJjOKs&t=309s])
* [https://www.youtube.com/watch?v=hZnWOxgX7A4&t=404s])
* [https://www.youtube.com/watch?v=ruDWmHRNxvE&t=218s])

[ad_2]
3 Comments
  1. Curious as to why you’d need the ?p= url? You can always see the post ID in the current url in your browser. Why do you need that url when you already have the slug?

  2. There’s Yoast which should display your permalink. I think you might be trying to reinvent the wheel here.

    There are some other slug editing plug-ins that should also display your permalink as set in Permalinks.

  3. There’s Yoast which should display your permalink. I think you might be trying to reinvent the wheel here.

    There are some other slug editing plug-ins that should also display your permalink as set in Permalinks.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer