anyone know how to custom box that contain “Publish,save draft,and preview button
” ?
i’ll hide all button except Publish button.
and same as “change permalink
” also “view,delete,edit
” link inside post how to hide the permalink and view link ?
here the illustration what i talking about.
Customizing Publish Button From Original WordPress
Customizing post link from original wordpress
delete permalink under wordpress post title
You can accomplish the above using hooks. Use the code below in your active theme’s
functions.php
file to get this workBelow has room for improvement, I couldn’t get the hooks to do the following, so used css way to hide it.
also conditional statement for add new post and custom publish metabox settings
let me know if there have another explanation.
thanks!
I just stumbled across this question and thought I’d share my most common solution which may not work for everyone in all scenarios but I believe this is the most efficient way to achieve the desired results.
When you register a CPT that does not require a single-view output in your theme or plugin, simply define the property
'public' => false,
For example a typical CPT registration might look something like this:
In one-fell-swoop, this should remove the view, slug and preview changes links from all associated admin screens. I like This solution, because it does not require any additional functions and the logic is defined in the same place as your cpt (obviously). Hope that this helps others out there, looking for a similar solution.
We can remove the Post preview, view and permalinks field by setting publicly_queryable argument to false.