WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding a logo (20 posts)

  1. thecampingcampground
    Member
    Posted 1 year ago #

    Hi,
    Im new to this wordpress stuff as of yesterday so please excuse me if this is simple to do. I am wanting to add a log to my website but all i get is a broken link image my code looks like this:

    <?php art_menu_items(); ?>
    
    	</div>
    </div>
    <div class="art-Header">
        <div class="art-Header-jpeg"></div>
    <div class="art-Logo">
        <h1 id="name-text" class="art-Logo-name">
            <a>/"><?php if  ( file_exists( TEMPLATEPATH . '/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg' ) ) { ?>
      </a><a>"><img src="<?php bloginfo('template_url'); ?>/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg" alt="<?php bloginfo('name'); ?>" /></a>
      <?php } else { ?>
      <h1><a>"><img src="<?php echo get_option('home'); ?>/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg" title="TheCampingCampground." alt="IMAGE TEXT." height="125" width="250"/></a></h1>
    <? } ?></h1>
        <div id="slogan-text" class="art-Logo-text">
            <?php bloginfo('description'); ?></div>
    </div>

    Any help would be very appreciated many thanks

    Jono

  2. thecampingcampground
    Member
    Posted 1 year ago #

    Now im getting this error
    Parse error: syntax error, unexpected '}' in /home/thecampi/public_html/wp-content/themes/superstore_camping/header.php on line 114

    please help thanks

  3. jnhghy
    Member
    Posted 1 year ago #

    Hi, the variables "TEMPLATEPATH" and get_option('home') are already pointing the browser to the wordpress directory and even more to your template directory so you will start from a different directory then "public_html". So having 'public_html' in the address is leading to a broken link. can you share your site address? Check the codex page and fix the link to the image.
    Regards

    About the second error ... you have <? } ?> instead of <?php } ?> at line 114 as the error says.

  4. thecampingcampground
    Member
    Posted 1 year ago #

    how do you know what line it is? im sorry im new at this

  5. jnhghy
    Member
    Posted 1 year ago #

    you can copy+paste the code in a text editor that shows the line count like gedit, kompozer, word, libreWriter ... edit the code in that one and then copy+paste it back in the wordpress editor.

  6. thecampingcampground
    Member
    Posted 1 year ago #

    <a>/">		<?php art_menu_items(); ?>
    
    </div>
    </div>
    <div class="art-Header">
    <div class="art-Header-jpeg"></div>
    <div class="art-Logo">
    <h1 id="name-text" class="art-Logo-name">
    /"><?php if ( file_exists( TEMPLATEPATH . '/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg' ) ) { ?>
    "><img src="<?php bloginfo('template_url'); ?>/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg" alt="<?php bloginfo('name'); ?>" />
    <?php } else { ?>
    <h1>"><img src="<?php echo get_option('home'); ?>/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg" title="TheCampingCampground." alt="IMAGE TEXT." height="125" width="250"/></h1>
    <?php } ?>
    <div id="slogan-text" class="art-Logo-text">
    <?php bloginfo('description'); ?></div>
    </div>
      <?php } else { ?>
      <h1></a><a>"><img src="<?php echo get_option('home'); ?>/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg" title="TheCampingCampground." alt="IMAGE TEXT." height="125" width="250"/></a></h1>
    <?php } ?></h1>
        <div id="slogan-text" class="art-Logo-text">
            <?php bloginfo('description'); ?></div>
    </div>

    im still getting the same error and my site will not work

  7. thecampingcampground
    Member
    Posted 1 year ago #

    ok fixed the error but now my site looks like this http://www.thecampingcampground.com

    and the code looks like this

    <?php art_menu_items(); ?>
    
    </div>
    </div>
    <div class="art-Header">
    <div class="art-Header-jpeg"></div>
    <div class="art-Logo">
    <h1 id="name-text" class="art-Logo-name">
    /"><?php if ( file_exists( TEMPLATEPATH . '/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg' ) ) { ?>
    "><img src="<?php bloginfo('template_url'); ?>/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg" alt="<?php bloginfo('name'); ?>" />
    <?php } else { ?>
    <h1>"><img src="<?php echo get_option('home'); ?>/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg" title="TheCampingCampground." alt="IMAGE TEXT." height="125" width="250"/></h1>
    <? } ?></h1>
    <div id="slogan-text" class="art-Logo-text">
    <?php bloginfo('description'); ?></div>
    </div>

    thanks for your help

  8. jnhghy
    Member
    Posted 1 year ago #

    well you have html errors you can't use a <h1> tag nested in another <h1> tag so try the fallowing code:

    <?php art_menu_items(); ?>
    </div>
    </div>
    <div class="art-Header">
    <div class="art-Header-jpeg"></div>
    <div class="art-Logo">
    <h1 id="name-text" class="art-Logo-name">
    /"><?php if ( file_exists( TEMPLATEPATH . '/images/camping_logo.jpg' ) ) { ?>
    "><img src="<?php bloginfo('template_url'); ?>/images/camping_logo.jpg" alt="<?php bloginfo('name'); ?>" />
    <?php } else { ?>
    <img src="<?php echo get_option('home'); ?>/wp-content/themes/superstore_camping/images/camping_logo.jpg" title="TheCampingCampground." alt="IMAGE TEXT." height="125" width="250"/></h1>
    <?php } ?></h1>
    <div id="slogan-text" class="art-Logo-text">
    <?php bloginfo('description'); ?></div>
    </div>

    and let's see the results :)

  9. thecampingcampground
    Member
    Posted 1 year ago #

    http://www.thecampingcampground.com

    Ok it looks better now but i still have broken link so i need to put the logo in a different folder right???

    <?php art_menu_items(); ?>
    
    </div>
    </div>
    <div class="art-Header">
    <div class="art-Header-jpeg"></div>
    <div class="art-Logo">
    <h1 id="name-text" class="art-Logo-name">
    <?php if ( file_exists( TEMPLATEPATH . '/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg' ) ) { ?><img src="<?php bloginfo('template_url'); ?>/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg" alt="<?php bloginfo('name'); ?>" />
    <?php } else { ?>
    <h1>"><img src="<?php echo get_option('home'); ?>/public_html/wp-content/themes/superstore_camping/images/camping_logo.jpg" title="TheCampingCampground." alt="IMAGE TEXT." height="125" width="250"/></h1>
    <? } ?></h1>
    <div id="slogan-text" class="art-Logo-text">
    <?php bloginfo('description'); ?></div>
    </div>
  10. jnhghy
    Member
    Posted 1 year ago #

    Nope, setting the logo in a different folder is not the solution using the right way to link wordpress to your folders is;
    what code are you running now?
    have you tried my code?
    also ... do you really need that

    /">
    in front of the logo?

  11. thecampingcampground
    Member
    Posted 1 year ago #

    ahh you are a guineas the logo is there but i have /">"> infront of it also and i dont mean to be a pain can i get the logo into the top left of the header image?

  12. jnhghy
    Member
    Posted 1 year ago #

    yes you can, the " /">"> " are there because you missplaced them in the source code ... check the code and delete them they are right before <?php art_menu_items(); ?>; after that well check the logo also ;)

  13. thecampingcampground
    Member
    Posted 1 year ago #

    Ok this is the code now but its still doing it am i missing something? im sorry for all this its my fist time with this as you cant tell...

    <div class="art-nav">
    	<div class="l"></div>
    	<div class="r"></div>
    	<div class="art-nav-center">
    	<ul class="art-menu">
    <?php art_menu_items(); ?>
    </div>
    </div>
    <div class="art-Header">
    <div class="art-Header-jpeg"></div>
    <div class="art-Logo">
    <h1 id="name-text" class="art-Logo-name">
    /"><?php if ( file_exists( TEMPLATEPATH . '/images/camping_logo.jpg' ) ) { ?>
    "><img src="<?php bloginfo('template_url'); ?>/images/camping_logo.jpg" alt="<?php bloginfo('name'); ?>" />
    <?php } else { ?>
    <img src="<?php echo get_option('home'); ?>/wp-content/themes/superstore_camping/images/camping_logo.jpg" title="TheCampingCampground." alt="IMAGE TEXT." height="125" width="250"/></h1>
    <?php } ?></h1>
    <div id="slogan-text" class="art-Logo-text">
    <?php bloginfo('description'); ?></div>
    </div>
  14. jnhghy
    Member
    Posted 1 year ago #

    ok, check the code and delete the characters you have:

    <div class="art-nav">
    <div class="l"></div>
    <div class="r"></div>
    <div class="art-nav-center">
    <ul class="art-menu">
    <?php art_menu_items(); ?>
    </div>
    </div>
    <div class="art-Header">
    <div class="art-Header-jpeg"></div>
    <div class="art-Logo">
    <h1 id="name-text" class="art-Logo-name">
    /"><?php if ( file_exists( TEMPLATEPATH . '/images/camping_logo.jpg' ) ) { ?>
    "><img src="<?php bloginfo('template_url'); ?>/images/camping_logo.jpg" alt="<?php bloginfo('name'); ?>" />
    <?php } else { ?>
    <img src="<?php echo get_option('home'); ?>/wp-content/themes/superstore_camping/images/camping_logo.jpg" title="TheCampingCampground." alt="IMAGE TEXT." height="125" width="250"/></h1>
    <?php } ?></h1>
    <div id="slogan-text" class="art-Logo-text">
    <?php bloginfo('description'); ?></div>
    </div>

    and in a closer look:

    <div class="art-Logo">
    <h1 id="name-text" class="art-Logo-name">
    /"><?php if ( file_exists( TEMPLATEPATH . '/images/camping_logo.jpg' ) ) { ?>
    "><img src="<?php bloginfo('template_url'); ?>/images/camping_logo.jpg" alt="<?php bloginfo('name'); ?>" />

    as you can see the 3rd row starts with /"> that ends nothing so delete it; also the 4th row starts with "> that again ends nothing ... so let's delete this also.

  15. thecampingcampground
    Member
    Posted 1 year ago #

    ok cool thats worked thanks

  16. thecampingcampground
    Member
    Posted 1 year ago #

    so how can i move the logo to top right is this possible or am i just going to mess things up again... Thanks for all of this

  17. jnhghy
    Member
    Posted 1 year ago #

    Are you sure you want to move it in the top right corner? Let's make sure I understand where you need it to be. when you say top right you want to have it above the head of the character?in your header? or you mean the top right of the page outside the header? or do you want it resized? or is the left top corner of the header the right place for it?

  18. thecampingcampground
    Member
    Posted 1 year ago #

    the top left corner of the header were the mountains are i think this is the best place for it..

  19. jnhghy
    Member
    Posted 1 year ago #

    ok then let's try:

    <h1 id="name-text" class="art-Logo-name">
    /"><?php if ( file_exists( TEMPLATEPATH . '/images/camping_logo.jpg' ) ) { ?>
    "><img src="<?php bloginfo('template_url'); ?>/images/camping_logo.jpg" alt="<?php bloginfo('name'); ?>" style="float: left; margin-top: -95px;" />
    <?php } else { ?>
    <img src="<?php echo get_option('home'); ?>/wp-content/themes/superstore_camping/images/camping_logo.jpg" title="TheCampingCampground." alt="IMAGE TEXT." height="125" width="250" style="float: left; margin-top: -95px;" /></h1>
    <?php } ?></h1>

    Replace this in your code and check it, let me know if it's ok.

  20. thecampingcampground
    Member
    Posted 1 year ago #

    amazing works great many thanks you have been extreamly helpful i guess i need to learn more before i fiddle again hahaha.

    Again thanks for your time and been so quick to respond

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags