I want to alter the view of edit.php in the posts admin area. What I want is when a category is set ( $_GET['cat'], cat=x in the url ), add post would be post-new.php?cat=x.

Is this possible?

I know there is a sample code on wordpress answers that gives you this ability, but it does not alter the Add Post / Add Page link on the edit.php screen. I've managed to do this by hacking the edit.php myself, but normally in the next update all changes will be lost.

here is a picture depicting what needs to be altered....

enter image description here

  • It's not quite clear what do you intend to accomplish by altering links? – Rarst Feb 25 '14 at 18:28
  • Trying to add automatically the category on new post/page/custom post once a user has selected it from the category select box (wp 3.8.1). So far I can only do it by altering the core edit.php file. – Panagiotis Feb 26 '14 at 8:09
  • 1
    Pretty sure I answered question exactly like this in the past, but shoot me I can't find it... :( – Rarst Feb 26 '14 at 8:46
  • I'd be very interested if you find that :) The reason is that I am making a dashboard panel for editors so that they would edit specific items (which have been stripped of custom fields and wpml panels) in the cms admin (simplified admin options). – Panagiotis Feb 26 '14 at 9:19
  • Ok, hadn't found mine, but found even better. :) See linked Q. – Rarst Feb 26 '14 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.