1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trouble editing wordpress theme

Discussion in 'Web Design' started by jleone2008, Oct 2, 2010.

  1. jleone2008

    jleone2008 Junior Member

    Joined:
    Apr 26, 2010
    Messages:
    125
    Likes Received:
    11
    Edit: Couple hours later and solved. That took longer than necessary. Found out that aside from the regular php files in the editor, it's also pulling more php files in another directory that isn't displayed anywhere in the admin panel. After going through the other files I was able to easily edit what was needed.

    _______
    I've started using the wordpress theme 'Albizia'. When editing anything such as the header I always get fatal errors, it crashes and the site can no longer load. I then have to go back and replace that file with the original.

    I've never had this kind of issue with a theme before, has anybody experienced this? Right now I simply want to add a cpa content lock script in but it won't even allow that without crashing.

    Here is an example of the header code:

    Code:
    <?php
    /**
     * Functions to handle the custom header
     *
     * @package itx_themes
     * @version 2.0.1
     */
    
    function itx_header(){
        extract(itx_get_option('header'));
        if ($head_type==1){
            echo'
            <div id="headerwrap">';
            if (!$scope) echo '<div id="header" class="wrap">';
                echo '<div class="clear"></div>
    				<a href="'.get_option('home').'/" title="'.htmlspecialchars(get_bloginfo('name')).'">
                    <img src="'.$logo.'" alt="'.htmlspecialchars(get_bloginfo('name')).'" title="'.htmlspecialchars(get_bloginfo('name')).'" />
                </a>';
            if (!$scope) echo '</div>';
            echo '</div>';
        }else{
            echo'
            <div id="headerwrap"><div class="clear"></div>
            <div id="header" class="wrap">';
    		if ( is_home() || is_front_page() ){
    			echo '<h1 class="header"><a href="'.get_option('home').'">'.get_bloginfo('name').'</a></h1>';
    		} else {
    			echo '<div class="header"><a href="'.get_option('home').'">'.get_bloginfo('name').'</a></div>';
    		}
            echo'<span>'.get_bloginfo('description').'</span>
            </div>
            </div>';
        }
    }
    
    function itx_header_styles(){
    	$halfwrap=$fullwrap='';
        extract(itx_get_option('header'));
    
    	$height=empty($height)?'':" height:$height;";
    	$bg=(empty($bg))?$image:$bg;
    	$img="background:$bgcolor url($bg) $repeat $h_align $v_align;$height";
    	if ($scope==1) $fullwrap=$img;
    	else $halfwrap=$img;
    
    	if (itx_get_option('layout','wrapping')=='fixed') $maxw=itx_get_option('layout','wrap').'px';
        else $maxw='98%';
        echo "
    #headerwrap{ $fullwrap text-align: $text_align;}
    #header{ $halfwrap }
    #header .header {font-size: {$font_size};}
    #header .header a {color: $color;text-decoration: none;}
    #header .header a:hover {color: $hover_color;}
    #header img{max-width:$maxw;}
    #header span {font-size: {$span_font_size};color: $span_color;}";
    }
    
    ?>
     
    Last edited: Oct 2, 2010
  2. BinaryGenius

    BinaryGenius Newbie

    Joined:
    Sep 17, 2010
    Messages:
    30
    Likes Received:
    1
    I was just about to say that I had the same issue. ill have to check into your solution as soon as I get back from work.
     
  3. jleone2008

    jleone2008 Junior Member

    Joined:
    Apr 26, 2010
    Messages:
    125
    Likes Received:
    11
    Let me know if you need any info. The files you edit in the wordpress editor are in the "includes" folder, but the real files are in the /themes/albizia.