Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter mentordeeyes

    (@mentordeeyes)

    Hi Esmi,
    That response was very informative. Thank you so much. Do you have a good theme that you can recommend? Here are my requirements.

    I am looking forward to add Ads on both sides of the pages except the main page.

    I am looking forward to add a store in one of those pages where I can remove the sidebar and expand the store to the full width of the page.

    Once again, your help is highly appreciated.

    Thank you.

    Mentor@Deeyes
    https://www.deeyes.net

    t31os,

    I have no developer background. I presume that your ‘div class’ example is to expand the content to the whole page width. I also assume that I do this in the ‘page.php’ file? If not, please advise me where do I make these additions to.

    Thank you.

    Mentor@Deeyes
    https://www.deeyes.net

    Thread Starter mentordeeyes

    (@mentordeeyes)

    Hi Esmi,

    Thank you for your prompt response. Yes, I did think that option but, thought, just make a change in existing code to bring the pages to the top would be easier that completely switching to a new theme. I thought switching themes would be a lengthier process than bringing the page element to the top. Please share your thoughts here. I have made few customization to this theme and changing to a new theme would involve doing the same all over again.

    Thank you.

    Mentor@Deeyes
    https://www.deeyes.net

    ###UPDATE###

    Lenk,

    I found the answer myself. I am able to remove the sidebar on this page but, as others mentioned, I am not able to expand the content of this page to the full width of this page. Can you help me how could I do this?

    Thank you.

    Mentor@Deeyes
    https://www.deeyes.net

    Lenk,

    Thank you so much for the solution. But, I don’t see a file under ‘wp-content’ in the name of my newly created page. I only see page.php and I suppose, this is NOT the page I should directly work with right. From what I read from your post, page.php is only a template. Please correct me if I am wrong. And another question I have is, where do I find the ID number of the page?

    Thank you.

    Mentor@Deeyes
    https://www.deeyes.net

    Thread Starter mentordeeyes

    (@mentordeeyes)

    Hi StvWlf,

    You are awesome. Thank you so much. That fixed my problem. I found this reference code in function.php. I moved the comment tags a bit and that fixed my problem. Now, I am able to use the custom folder with the widget / sidebar. For yours and others reference I am quoting below the part of codes in which I found the comment tages before change and after change.

    Before Change

    function kubrick_head() {
    	$head = "<style type='text/css'>\n<!--";
    	$output = '';
    	if ( kubrick_header_image() ) {
    		$url =  kubrick_header_image_url() ;
    		$output .= "#header { background: url('$url') no-repeat bottom center; }\n";
    	}
    	if ( false !== ( $color = kubrick_header_color() ) ) {
    		$output .= "#headerimg h1 a, #headerimg h1 a:visited, #headerimg .description { color: $color; }\n";
    	}
    	if ( false !== ( $display = kubrick_header_display() ) ) {
    		$output .= "#headerimg { display: $display }\n";
    	}
    	$foot = "--></style>\n";
    	if ( '' != $output )
    		echo $head . $output . $foot;
    }

    After Change

    function kubrick_head() {
    	$head = "<!--<style type='text/css'>\n";
    	$output = '';
    	if ( kubrick_header_image() ) {
    		$url =  kubrick_header_image_url() ;
    		$output .= "#header { background: url('$url') no-repeat bottom center; }\n";
    	}
    	if ( false !== ( $color = kubrick_header_color() ) ) {
    		$output .= "#headerimg h1 a, #headerimg h1 a:visited, #headerimg .description { color: $color; }\n";
    	}
    	if ( false !== ( $display = kubrick_header_display() ) ) {
    		$output .= "#headerimg { display: $display }\n";
    	}
    	$foot = "</style>\n-->";
    	if ( '' != $output )
    		echo $head . $output . $foot;
    }

    Changes are made in the second line from top and third line from bottom. Once again thank you for saving my day.

    Mentor@Deeyes

    Thread Starter mentordeeyes

    (@mentordeeyes)

    Hello Figaro,
    Thanks for trying to help me here. I did look at your link and watched your Video 3 of 3 from the link. As seen in your video, I went to ‘header.php’ but, I don’t see any content inside the
    <div id=”header> and </div> tags to delete. For your reference, I am quoting below the actual contents of my ‘header.php’ file. Please guide me here. Thanks once again for your help.

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="https://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
    
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    <style type="text/css" media="screen">
    
    <?php
    // Checks to see whether it needs a sidebar or not
    if ( !empty($withcomments) && !is_single() ) {
    ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
    <?php } else { // No sidebar ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    <?php } ?>
    
    </style>
    
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    
    <?php wp_head(); ?>
    </head>
    <body>
    <div id="page">
    
    <div id="header">
    </div>
    <hr />
    Thread Starter mentordeeyes

    (@mentordeeyes)

    Hi StvWlf,

    I did find ‘header-img.php’ inside the ‘image’ folder and that file doesn’t contain your reference codes from ‘View –> Source’ from the browser. Please find below the content of ‘header-img.php’.

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    /** @ignore */
    $img = 'kubrickheader.jpg';
    
    // If we don't have image processing support, redirect.
    if ( ! function_exists('imagecreatefromjpeg') )
    	die(header("Location: kubrickheader.jpg"));
    
    // Assign and validate the color values
    $default = false;
    $vars = array('upper'=>array('r1', 'g1', 'b1'), 'lower'=>array('r2', 'g2', 'b2'));
    foreach ( $vars as $var => $subvars ) {
    	if ( isset($_GET[$var]) ) {
    		foreach ( $subvars as $index => $subvar ) {
    			$length = strlen($_GET[$var]) / 3;
    			$v = substr($_GET[$var], $index * $length, $length);
    			if ( $length == 1 ) $v = '' . $v . $v;
    			$$subvar = hexdec( $v );
    			if ( $$subvar < 0 || $$subvar > 255 )
    				$default = true;
    		}
    	} else {
    		$default = true;
    	}
    }
    
    if ( $default )
    	list ( $r1, $g1, $b1, $r2, $g2, $b2 ) = array ( 105, 174, 231, 65, 128, 182 );
    
    // Create the image
    $im = imagecreatefromjpeg($img);
    
    // Get the background color, define the rectangle height
    $white = imagecolorat( $im, 15, 15 );
    $h = 182;
    
    // Define the boundaries of the rounded edges ( y => array ( x1, x2 ) )
    $corners = array(
    	0 => array ( 25, 734 ),
    	1 => array ( 23, 736 ),
    	2 => array ( 22, 737 ),
    	3 => array ( 21, 738 ),
    	4 => array ( 21, 738 ),
    	177 => array ( 21, 738 ),
    	178 => array ( 21, 738 ),
    	179 => array ( 22, 737 ),
    	180 => array ( 23, 736 ),
    	181 => array ( 25, 734 ),
    	);
    
    // Blank out the blue thing
    for ( $i = 0; $i < $h; $i++ ) {
    	$x1 = 19;
    	$x2 = 740;
    	imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
    }
    
    // Draw a new color thing
    for ( $i = 0; $i < $h; $i++ ) {
    	$x1 = 20;
    	$x2 = 739;
    	$r = ( $r2 - $r1 != 0 ) ? $r1 + ( $r2 - $r1 ) * ( $i / $h ) : $r1;
    	$g = ( $g2 - $g1 != 0 ) ? $g1 + ( $g2 - $g1 ) * ( $i / $h ) : $g1;
    	$b = ( $b2 - $b1 != 0 ) ? $b1 + ( $b2 - $b1 ) * ( $i / $h ) : $b1;
    	$color = imagecolorallocate( $im, $r, $g, $b );
    	if ( array_key_exists($i, $corners) ) {
    		imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
    		list ( $x1, $x2 ) = $corners[$i];
    	}
    	imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $color );
    }
    
    //die;
    header("Content-Type: image/jpeg");
    imagejpeg($im, '', 92);
    imagedestroy($im);
    ?>
    Thread Starter mentordeeyes

    (@mentordeeyes)

    I don’t see a file named ‘header-img.php’, I see only ‘image.php’ but, I don’t see these reference lines in that file either. Here is the bunch of codes I see in ‘header.php’ that is comparitively close to your reference codes. But, other than this, I don’t see anything that is similar to your reference codes in ‘header.php’. Thank you so much for your support.

    <style type="text/css" media="screen">
    
    <?php
    // Checks to see whether it needs a sidebar or not
    if ( !empty($withcomments) && !is_single() ) {
    ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
    <?php } else { // No sidebar ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    <?php } ?>
    
    </style>
    
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    
    <?php wp_head(); ?>
    </head>
    <body>
    <div id="page">
    
    <div id="header">
    </div>
    <hr />
    Thread Starter mentordeeyes

    (@mentordeeyes)

    Hello Stvwlf,

    Thanks so much for your efforts to help me. I don’t know what I am doing wrong here. For some reason, I don’t see your reference codes in my ‘header.php’ file. for your information, I am looking at this location ‘\wordpress\wp-content\themes\default\header.php’. But, I don’t see the lines you mentioned above in this file. For that matter, I don’t see these lines anywhere at all in my header.php file. Where did you find these lines and what am I doing wrong and why don’t I see those lines? Once again thank you so much for your help.

    UPDATE / CORRECTION:

    Yes, now I am able to see the lines that you have mentioned in your post when I do View –> Source from the IE browser screen. But, I don’t see these lines if I open the header.php file directly. Where am I going wrong?

    Mentor@Deeyes

    Thread Starter mentordeeyes

    (@mentordeeyes)

    Hello,

    Thank you for the prompt response. I will replace the functions.php and that will messup with the header (banner). Below is the url. If someone could look at it and help me with this, that would be really appreciated.

    https://www.deeyes.net

    Thank you.
    Mentor@Deeyes

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