Changing nav menu text "Home" to logo link

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • konzaales
    New Member
    • May 2013
    • 9

    #1

    Changing nav menu text "Home" to logo link

    Hi!
    I'm using scrn theme in my wordpress site and i'm trying to change themes Home button to clickable logo link.

    Heres some code you might be interested about

    Code:
    $count = count($pages);
    		if($scrn['menu_homelink'] == '1') 
    			echo '<li><a href="' . get_home_url() . '/#intro">Home</a>';
    		for($i = 0; $i < $count; $i++)
    		{
    I do know how to change text to anything but i'd like to add my logo insted of just simple text.

    Thank you.
    Last edited by Rabbit; May 15 '13, 03:58 PM. Reason: Please use code tags when posting code.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    I'm not sure I understand the trouble you're having. Just put the logo in place of where you have the text.

    Comment

    • konzaales
      New Member
      • May 2013
      • 9

      #3
      Thanks for response!.

      I mean that I know how to change Home word into something else. Home word is a button in navigation of this theme.

      '/#intro">Home</a>';

      After pushing Home button page jumps to the header of the page.
      I just dont know how to put my image instead of that text as i'm so noob in php :)

      Comment

      • konzaales
        New Member
        • May 2013
        • 9

        #4
        I put
        Code:
        $count = count($pages);
        		if($scrn['menu_homelink'] == '1') 
        			echo '<li><a href="' . get_home_url() . '/#intro"><img src="/images/testi2.jpg"> </a>';
        Testi2.jpg is my logo but it doesnt show up.
        What am I doing wrong ?
        Last edited by Rabbit; May 15 '13, 05:45 PM. Reason: Please use code tags when posting code. Second warning.

        Comment

        • Rabbit
          Recognized Expert MVP
          • Jan 2007
          • 12517

          #5
          That should work fine assuming the relative path you set up is correct and the file name is accurate. One of those two things is probably wrong.

          Comment

          • konzaales
            New Member
            • May 2013
            • 9

            #6
            It somehow changes cursor like its supposed to and it works like its supposed to but it just doesnt show actual image and linkable section is something like 1-2px wide...this is just weird.
            I'm doing this in localhost and "http://localhost/wordpress/images/testi2.jpg/" is source to image and I tried to add this whole line but it still doesnt show up...

            Comment

            • konzaales
              New Member
              • May 2013
              • 9

              #7
              Code:
              'id' => 'nav_color',
              
              						'type' => 'color',
              
              						'title' => 'The color for the navigation menu',
              
              						'sub_desc' => 'The color used on the navigation menu',
              
              						'std' => '#515151'
              
              						),
              
              					array(
              
              						'id' => 'nav_hovercolor',
              
              						'type' => 'color',
              
              						'title' => 'The hover color for the navigation menu',
              
              						'sub_desc' => 'The hover color used on the navigation menu',
              
              						'std' => '#000000'
              
              						),
              
              					array(
              
              						'id' => 'nav_size',
              
              						'type' => 'text',
              
              						'title' => 'The font-size for the navigation menu items',
              
              						'sub_desc' => 'The font-size used on the navigation menu items',
              
              						'std' => '16'
              
              						),
              
              					array(
              
              						'id' => 'nav_font',
              
              						'title' => 'Font for the navigation menu items:',
              
              						'type' => 'select',
              
              						'options' => $google_fonts,
              
              						'sub_desc' => 'The google font to be used on the navigation menu items',
              
              						'std' => 'Source+Sans+Pro'
              
              						),
              This is related to navigation.

              Comment

              • konzaales
                New Member
                • May 2013
                • 9

                #8
                Code:
                $pages = get_pages($args); 
                		foreach ( $pages as $page ) {
                			echo '<option value="'.$page->ID.'"'.selected($this->value, $page->ID, false).'>'.$page->post_title.'</option>';
                		}
                So is this...
                I'm out like a snowman...
                I hope this helps.

                Comment

                • Rabbit
                  Recognized Expert MVP
                  • Jan 2007
                  • 12517

                  #9
                  What happens when you put that full address path into a web browser, not as part of another page but just typed directly into the url input? It should show the image. If it doesn't, then the path you are using is probably wrong.

                  Comment

                  • konzaales
                    New Member
                    • May 2013
                    • 9

                    #10
                    Thank you for quick answers. I got it sorted out my image didnt shoe so i checked it again and got it workin.

                    Comment

                    • Rabbit
                      Recognized Expert MVP
                      • Jan 2007
                      • 12517

                      #11
                      Glad you got it working, can you share what the solution in case someone else runs into the same issue in the future?

                      Comment

                      • konzaales
                        New Member
                        • May 2013
                        • 9

                        #12
                        Hi!
                        Here's solution you need to go to Teopanel/custom-funktionsa.php and find
                        Code:
                        echo '<li><a href="' . get_home_url() . '/#intro">Home</a>';
                        Then change it to
                        Code:
                        echo '<li><a href="' . get_home_url() . '/#intro"><img src="link to your logo" /></a>'

                        Comment

                        • konzaales
                          New Member
                          • May 2013
                          • 9

                          #13
                          Also logo is needed to be uploaded into Wordpress Media...

                          Comment

                          Working...