Trying to replicate some functionality I’ve seen on a few other themes before, but would like to know/understand for my own uses.
I’ve created a custom post type, called “testimonials”. I believe I’ve knocked out a pretty good chunk of the setup, using Justin Tadlock’s awesome post on Custom Post Types. I’ve also seen his post on removing meta boxes, which is great. The thing I’m after is, when you usually type in a title on a post/page and click off of it, you’ll get an “edit permalink” area. Normally, this is actually a useful thing, but in my case, for “testimonials” or “slideshow slides” this may actually confuse the user. Furthermore, once you save a “testimonial” or “slide”, you may not want there to be an actual “single view”. I’m not sure how it is normally done (poked around inside WooThemes — but I’m still lost). I could do this with CSS, but looking at the actual source code of the page for Woothemes for example… it’s just gone (which is what I prefer). Any help would be greatly appreciated. Thanks!
There is a filter
get_sample_permalink_html
that returns this area as a string. Here’s how you can use it:Updated the code. Please check this.
Updated Changed the double quotes to single quote on view-post-btn. Tested up till 3.2
You could also use CSS to hide it, based on your client’s role. If you’re interested, I can give you a code sample.
If using css: