Support » Fixing WordPress » modifying /wp- admin/custom-header.php

  • I am setting up the Custom Headers admin page as used in the twenty ten
    theme on another theme. I need to remove some of the options from the Admin screen.

    This is a multisite installation. We want users to select one of the custom headers that will display on the custom header page. We don’t want them to be able to upload their own file.

    I found everything on the admin screen is hard coded in
    /wp-admin/custom-header.php. There are no classes or ID’s or filters in the code in the parts of custom-header.php that I can use to hide parts of the display. Any suggestions on how to modify the page layout? Thank you

Viewing 15 replies - 1 through 15 (of 19 total)
  • hey, I’m having some random error because of my custom-header.php

    “Parse error: syntax error, unexpected $end in /home/a8123821/public_html/wordpress/wp-admin/custom-header.php on line 130”

    Any chance you could throw up a copy of yours so that I could maybe replace mine with it?


    wp-admin/custom-header.php is a standard file included in every copy of WordPress. Just download whatever version of WordPress you are running and copy that file to your WordPress installation on the server.

    If you need a version prior to 3.2.1 they are here

    Hey, thanks for the reply. I will definately do that. Do you know of a way of checking what version you are running when you can’t login? I basically only have access to the blog (

    At the minimum you have to be able to log into the dashboard area, if you can’t access by FTP. When logged into the Dashboard, click Home at the very top of the Dashboard menu. The “Right Now” box to the right of where you just clicked displays the WordPress version number that is running on the site.

    hey, I replaced the file with the same file from the most recent version. Doing this allowed me onto the dashboard, but only kind of. What is displayed is sort of like a glitchy version of the dashboard, with a lot of features missing. Any ideas? πŸ™‚

    I suggest you upload the entire WordPress software again, writing over your existing files. Sounds like you are missing some, or they got corrupted.

    If you are using the twentyten or twentyeleven themes, back them up before doing this. They are the only files that will be written over that could possibly result is loss of your user files.

    Cheers, I was just considering doing that. I reckon that there’s some issue with the php on the old version of wordpress I was on, but not being able to access the dashboard stops me updating the version as usual.
    Pretty much going to delete everything, and install wordpress as if I was starting from scratch. Can you tell me what files/folders I would need to make a copy of to preserve my blog posts? I’m not too concerned about any uploaded media, just the text. Want to get this sorted as easily as possible.:-)
    Thanks again for the advice.

    All you need to do is overwrite your existing WP files with a full install. None of your text is in files. It is all in the database. WP will not overwrite your uploaded media.

    Be aware that the lastest version, 3.2.1, require a minimum of PHP 5.2.4 and MySQL 5.0.15 If your server is still on PHP 4 or MySQL 4 you need to install WP version 3.1.2 as 3.2.1 will not run on your server. If you have any question about what is installed ask your webhost before reloading the WordPress files.

    As I said earlier, unless you are using either the twentyten or twentyeleven theme WordPress will not overwrite any of your user content. Backing up the database first is a good idea. That can be done through your web hosting control panel.

    Great thanks. I was using the ‘Motion’ theme I think, so should be ok. SO I can delete the hosted wordpress folder and just re-install. Cool πŸ™‚ Will get in touch with my webhost now πŸ™‚

    DO NOT delete ANY WordPress files!!!! Just install the WP installation you are reinstalling on top of the files that are already there.

    There ARE other files within the WP folders that you need. What I said was installing WordPress ON TOP OF existing files will not overwrite anything necessary. Deleting all the files will DEFINITELY remove necessary files that reinstalling WordPress will not replace!!


    ha ha ok πŸ™‚ got ya. Cheers

    Getting this window when I try to run the install.php file:

    Can’t select database
    We were able to connect to the database server (which means your username and password is okay) but not able to select the database_name_here database.

    Are you sure it exists?
    Does the user a8123821_user have permission to use the database_name_here database?
    On some systems the name of your database is prefixed with your username, so it would be like username_database_name_here. Could that be the problem?
    If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

    Any ideas?

    The message is telling you the database username and password are correct. It is the database name the database user is connecting to that is not correct.

    This means the entry in the wp-config.php file for database name is incorrect. That file is in the top folder of your WordPress install.

    Double check the entry of the database name to make sure it matches the name as created by your webhost. If you know how to access PHPmyAdmin in your webhost control panel you can look there. If you don’t, best to ask the webhost what the name of the database is.

    Ah you were right, just missed that field when editing the file. ITS WORKING NOW!! Hehe. Thanks very much. You sir, are a god πŸ™‚

    It stayed working for a few hours. Made a post and everything. And all of a sudden it started giving me this error message and hasn’t stopped. I think I’m cursed…

    PHP Error Message

    Warning: require_once(class.HookdResource.php) [function.require-once]: failed to open stream: No such file or directory in /home/a8123821/public_html/wordpress/wp-content/plugins/wordpress-hit-counter/image.php on line 33

    Free Web Hosting

    PHP Error Message

    Fatal error: require_once() [function.require]: Failed opening required ‘class.HookdResource.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/a8123821/public_html/wordpress/wp-content/plugins/wordpress-hit-counter/image.php on line 33

    Free Web Hosting

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘modifying /wp- admin/custom-header.php’ is closed to new replies.