• Hi guys, I am not familiar with editing PHP code. Most of my experience is with html. I am working on my website and the current theme I’m using doesn’t have logo replacement in the dashboard options, so I’m looking into the “header.php” file. I could delete all of the code related to the logo and the logo will go away, but I would rather replace it with my own logo. I do not know PHP well enough to know what parts of the code to edit or where to put my logo file.

    I’ve tried searching everywhere for help with this but I only found help with header.php files from the basic wordpress template.

    Below is the code for logo portion of the header.php file for the theme I’m using:

    __________________________________________________________________________

    //!THEME OPTIONS
    		//!	Logo
    			$miami_logo_style = $miami_options->getPageOption('miami_logo_style',false,'themeoption');
    			$miami_logo_style_default = $miami_logo_style=='themeoption' ? true : false;
    			$miami_logo_style = $miami_options->getPageOption('miami_logo_style',$miami_logo_style_default);
    			$miami_logo_width =  $miami_options->getPageOption( 'miami_head-logo_width',$miami_logo_style_default);
    			$miami_logo =  $miami_options->getPageOption( 'miami_head-logo',$miami_logo_style_default);
    			$miami_head_logo_resp = $miami_options->getPageOption( 'miami_head-logo_resp',$miami_logo_style_default);
    			if(is_numeric($miami_logo)) { 
    				$miami_logo= wp_get_attachment_image_src($miami_logo, 'full'); 
    				$miami_logo = $miami_logo[0];
    				$miami_logo_width = $miami_logo[1];
    			}
    		//! Logo Scroll
    			if($miami_logo_style=='twologos'){
    				$miami_logo_scroll =  $miami_options->getPageOption( 'miami_head-logo-scroll',$miami_logo_style_default);
    				$miami_head_logo_scroll_resp = $miami_options->getPageOption( 'miami_head-logo-scroll_resp',$miami_logo_style_default);
    				$miami_logo_scroll_width =  $miami_options->getPageOption( 'miami_head-logo-scroll_width',$miami_logo_style_default);
    				if(is_numeric($miami_logo_scroll)) { 
    					$miami_logo_scroll= wp_get_attachment_image_src($miami_logo_scroll, 'full'); 
    					$miami_logo_scroll = $miami_logo_scroll[0];
    					$miami_logo_scroll_width = $miami_logo_scroll[1];
    				}
    			}
    			else {
    				$miami_logo_scroll = $miami_logo;
    				$miami_head_logo_scroll_resp = $miami_head_logo_resp;
    			}
    			
    			$miami_logo_width = empty($miami_logo_scroll_width) || $miami_logo_width>$miami_logo_scroll_width ? $miami_logo_width : $miami_logo_scroll_width ; 
    			
    			
    			if($miami_menu_links_orientation == 'leftside'){
    				$miami_logo_width_style = 'style="padding-left:'.$miami_logo_width.'px"';
    			}
    			else{
    					$miami_logo_width_style = '';
    				}

    ____________________________________________________________________________________

    Any help would be appreciated. Thanks.

    • This topic was modified 9 years, 2 months ago by Steven Stern (sterndata). Reason: replaced blockquote with code backticks
Viewing 1 replies (of 1 total)
  • This code indicates there there is already a setting in your theme to switch the logo. I would contact your theme developers / support or maybe find documentation that might point you to where the setting is.

Viewing 1 replies (of 1 total)

The topic ‘Editing “header.php” to swap logo’ is closed to new replies.