• I am having problems editing the Atahualpa theme functions file to recognize anything. In the example below I’m trying to replace the dashboard logo and nothing happens. No matter what function I put in here nothing ever happens. I’ve tried putting my code inside the main php body as well as creating a new php area as seen here. I’ve spent hours on this and can’t figure it out. Thanks.

    <?php
    
    // Replace dashboard logo
    add_action('admin_head', 'my_custom_logo');
    
    function my_custom_logo() {
       echo '
          <style type="text/css">
             #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/32x32_Wings.png) !important; }
          </style>
       ';
    }
    
    ?>
Viewing 9 replies - 1 through 9 (of 9 total)
  • The Atahualpa theme is usually customized by editing the 20 plus pages found in the options menu.

    Why not just go to Appearance > Atahualpa Theme Options > Style and Edit Header Area > Show Logo Image? – where you can simply; “upload an image to /wp-content/themes/atahualpa/images/ and put the file name of the image into this field. “ to change the logo in the header?

    [edit] after re-reading, perhaps I’m misinterpreting what you are after – although I don’t actually see a default logo in the themes options administration area anywhere. What is the location of the image you actually want to change?

    Thread Starter azazure

    (@azazure)

    That location in the ATO is for the logo on the home page. The logo I’m trying to replace is the WordPress “W” on the user profile page. I found this code snippet doing a search and made sure it was to be placed in the Theme’s functions file and not in the WP functions file. I really appreciate your help on this.

    Ahhh.. now I understand. Open the functions.php file for the Atahaulpa theme. Scroll to the very bottom of the file. Just before the closing php tag, on the line right above it, add your code. The bottom of the file will look exactly like this on lines 935 – 944;

    */
    add_action('admin_head', 'agentwp_dashboard_logo');
    function agentwp_dashboard_logo() {
       echo '
         <style type="text/css">
             #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/32x32_Wings.png) !important; }
          </style>
            ';
    }
    ?>

    I just tested this on my own copy of Atahaulpa, and it worked like a charm. I tested it with a 32×32 .gif and a 32×32 .png, and they both worked.

    Thread Starter azazure

    (@azazure)

    I tried that but it didn’t work. However, my functions.php theme file has twice as many lines, more than 1800. I inserted the code at the very bottom on line 1872 as you see here. This file is straight out of the box, I have no other changes to this file so I don’t understand why mine has twice as much bulk as your functions file. I am using v3.6.1

    */
    // Replace dashboard logo
    add_action('admin_head', 'my_custom_logo');
    
    function my_custom_logo() {
       echo '
          <style type="text/css">
             #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/32x32_Wings.png) !important; }
          </style>
       ';
    }
    ?>
    Thread Starter azazure

    (@azazure)

    OK, I got it to work. I took out the comment and the blank line before the ?> so that it matched your exactly. What was messing me up? Was it the comment or the blank lines? I don’t get it. I see comments and blank lines throughout this file so why should mine cause problems?

    I’m using latest version 3.6.4 from the authors site, but the functions.php file for version 3.6.1 only has 937 lines. I just downloaded it and checked. http://ww.wp.xz.cn/extend/themes/atahualpa

    It might have been the comment – or the blank line. πŸ™‚

    Thread Starter azazure

    (@azazure)

    Maybe the line number difference is because I’m editing the file in Notepad++

    Anyway, I can’t thank you enough. I have spent so much time on this and no one else seemed to be having the same problems. Thank you for taking the time to help me!

    You’re welcome. Glad it finally worked for you!

    I’m editing the file in Notepad++

    So am I.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Editing functions.php file’ is closed to new replies.