WordPress.org

Ready to get started?Download WordPress

Forums

post.php in admin (13 posts)

  1. Pamela
    Member
    Posted 3 years ago #

    I have changed post.php and template.php in wp-admin/includes. The person I have done it for is not happy that I have changed the core code as it will mean adding the changes back in everytime there is an upgrade. How can I get round it as there isn't a template system for the admin side is there?

    Thanks

  2. keesiemeijer
    moderator
    Posted 3 years ago #

    What is it you want to change in post.php. the layout? or functionality?

  3. Pamela
    Member
    Posted 3 years ago #

    functionality

  4. keesiemeijer
    moderator
    Posted 3 years ago #

    Yes but what functionality? Have you looked at adding metaboxes to the edit post page? Or using custom fields?

  5. Pamela
    Member
    Posted 3 years ago #

    I want the layout to be slightly different for a couple of custom fields. It works ok but he wants it taking out of the core and I can see why but I can't see that is possible

  6. Pamela
    Member
    Posted 3 years ago #

    It is the layout of the custom fields in the admin that has changed to make inputting easier. The front end is staying as it is

  7. Pamela
    Member
    Posted 3 years ago #

    For a couple of Custom fields in the admin they need to be a dropdown instead showing the contents of an image library rather than having to type in the whole address every time

  8. keesiemeijer
    moderator
    Posted 3 years ago #

    I would create a metabox because you can format it exactly the way you want without messing with the core files. Here is a nice tutorial: http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html
    You can download a metabox from that tutorial to play with.

  9. Pamela
    Member
    Posted 3 years ago #

    Thanks - I had just spotted that metaboxes seemed to be what I wanted. I hadn't heard of them until you mentioned it. I will have a play now

  10. Pamela
    Member
    Posted 3 years ago #

    I presume that the functions.php file that is changed is the one under the the theme?

  11. Pamela
    Member
    Posted 3 years ago #

    That doesn't change the layout in the admin does it? I have changed the admin for the custom fileds so that if you select say Image for the custom field the value box in the admin changes to a dropdown of images in the image library. I need to do that outside of the core but metaboxes doesn't look as though that is what I want after all. O dear

  12. keesiemeijer
    moderator
    Posted 3 years ago #

    I presume that the functions.php file that is changed is the one under the the theme

    That's correct.

    That doesn't change the layout in the admin does it?

    It will not change the layout but adds a metabox with a form that will save the form data as custom fields when you publish or update a Post.

  13. Pamela
    Member
    Posted 3 years ago #

    Hmm so how does it work for a select? How do you add in the options? I need them to be all the images names in a library. I presume that when you select dbt_select in the add new custom field drop down the value changes to a dropdown box?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags