WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to upload own php code (5 posts)

  1. williepabon
    Member
    Posted 1 year ago #

    If I have a specific html code (front end) and php code (back end) that I want to use in my Theme, how do I upload it? Thanks for any help.

  2. catacaustic
    Member
    Posted 1 year ago #

    There's several ways to do it.

    In the admin area I'd suggest either adding it to a current menu item uisng something like add_admin_page() or add_options_page() (or any of the other options there). That's the easiest way to get the admin working.

    In the front-end you can either add it directly to your template files, or set up your own functions to display whatever it is, or you can set up widgets and/or shortcdoes to display the data.

  3. williepabon
    Member
    Posted 1 year ago #

    Catacaustic:

    Thanks for the reply. I'm newbie doing these things, and not sure how to proceed. Was thinking that the end goal of uploading the php code is to have it like another script that shows when I do Appearance > Editor on the WordPress Dashboard. Don't know if this is possible. Think that for the html code, I can create a page for it, right? Thanks for your patience.
    wp

  4. catacaustic
    Member
    Posted 1 year ago #

    That is possible. You'll need to build that into your theme or create a new plugin for it.

    Look at the add_menu_page() function and that will give you the basics of how to do it.

  5. williepabon
    Member
    Posted 1 year ago #

    Catacaustic:

    Thanks again. I know now what it is needed to be done, and find that this is beyond my knowledge of WordPress and coding (php or html). But, thanks anyway for your kind help. Will continue to look if somebody already did what I need to do.
    wp

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags