• Hi, Eduard, new here…
    So, basicaly, what I want to do is to make a script.php file, and when I run it I want to do the following:
    – remove or change the logo (the one in the top-left corner of the admin screen)
    – remove or change some other elements like Help in the top-right side of the admin menu), or other elements.

    this script.php, basicly, will modify the wordpress core with simple php file handling (fopen, fwrite, fclose, etc.)

    Now, the question is: Where do I want to insert this code? In what core wordpress file do I want to insert the code to remove or change the things I mentioned above?

    P.S. I know that this is relatively easy to do with a plugin, but I don’t want to do that because I already know. I want to learn how WordPress work.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The first thing you should learn about PHP coding in WordPress is that no one should ever alter core files under any circumstance. There is never any reason to do so, there are numerous action and filter hooks you can use to alter core functionality without actually altering the core code.
    https://codex.www.ads-software.com/Plugin_API#Hooks.2C_Actions_and_Filters

    There’s really only two places where you can place custom code in the WP environment: a plugin or a child theme (or your own custom theme). Child themes allow you to override the parent theme’s templates, which is one way to change the logo or anything else theme related. PHP functions,such as your filter and action hooks, can go on the child theme’s functions.php, or in a plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘standalone script’ is closed to new replies.