Jump to content

Archived

This topic is now archived and is closed to further replies.

21thirteen

Make the logo link to another page in the site

Recommended Posts

21thirteen    1
21thirteen

I've not been able to find anything in the Forums or on Google for WP in general to address this issue. I've been working on a site for a client - currently at both http://americancampus.staging.wpengine.com/ and at http://americancampus.staging.wpengine.com/ - where I managed to create a "Splash" page with a full browser slideshow and no header or nav (by using css for display:none for the navi section in a media box).

 

The client wants this as the "home" page so that when the url is typed in the site opens with this page and buttons link to a different page (currently "/home6/")

 

Once "inside" the site the Navi section with the logo and navigation is, and should be, visible on all other pages.

 

The problem is that clicking on the logo takes you to the Splash page, which of course is set as the "Home" page in the WP Dashboard/Settings/Reading, instead of to /home6/, which is where I want it to go.

 

I am not a php guy but I'm OK with CSS and html.

 

Is there ANY way to make the logo in the Navi section link to a specific page instead of to the default ("/") home page?

 

Thanks so much in advance - 

Perry

Share this post


Link to post
Share on other sites
21thirteen    1
21thirteen

Hi Aires - thanks for your quick response - yes, I agree about searching the forum.

 

Unfortunately i don't know the first thing about PHP. I followed the directions to install the customize plugin and then downloaded the function.php file and edited it but I'm not even sure of where or how exactly I'm supposed to put the code.

 

The functions.php file has a section that says this:

/*
// ====================================================
// = YOUR FUNCTIONS - Where you should add your code  =
// ====================================================
*/
 
I'm not sure how the // and the /* or */ work, though of course I know how  /*  */ works in a CSS file.
 
I took the code from the post you sent me the link to and did this with it:

// ====================================================
add_filter( 'navbar_brand', 'my_logo_url' );
function my_logo_url( $logo ) {
return '<a class="plbrand" href=“/home6/“ title=""><img class="mainlogo-img" src="/wp-content/uploads/2014/07/ac-logo.png" alt="" /></a>';
}
// ====================================================
 
then uploaded it to replace the original php file in the correct directory and ... nothing... I'm not even sure this example applies because I'm using the Navi section and I don't know if 'navbar_brand' relates to that or something else.
 
Any advice as to where, how or what I should do with the functions.php file to get this to work?
 
Thank you!

 

Share this post


Link to post
Share on other sites
21thirteen    1
21thirteen

btw, I also tried this as well:

 

// ====================================================
 
 
add_filter( 'pagelines_site_logo', 'my_logo_url' );
function my_logo_url( $site_logo ) {
return '<a class="plbrand" href=“/“home6/“ title=""><img class="mainlogo-img" src="/wp-content/uploads/2014/07/ac-logo.png" alt="" /></a>';
 
}
// ====================================================
 
... nuthin'... ;-(

Share this post


Link to post
Share on other sites
21thirteen    1
21thirteen

OK, I looked it up and // means a single line is commented out, /* */ means multiple lines are commented out, so I think I'm OK there. I also thought maybe I have to put in absolute url's instead of relative ones ... still no go!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

That code only works for the NavBar section and not the Navi section unfortunately. As far as I am aware there is no filter to replace the Navi sections logo image url. However, upon looking at your site, there isn't really any need to use the Navi section for a logo image due to how you have customized the section via CSS. If I was you, I would just disable the navi logo via the option and then use a MediaBox above Navi section.

 

In the MediaBox, you can use basic HTML to link to any page you like. For example:

 

<a href="...">

  <img src="..." alt="...">

</a>

  • Like 1

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
21thirteen    1
21thirteen

Danny - Been meaning to get to this: just so you (and anyone else) know, I implemented your suggestion and it worked out well.

 

The "Splash" page is a Rev slider set to full window height, and the footer area. I put a media box in the superfooter area (and also the modal popup plugin for an optin) and i put the css in the media box: <style type="text/css">.section-navi {display:none;} .nosplash {display:none;}</style> to get rid of the navi section (giving the fixed area a custom class of "nosplash".

 

On the "Home" page I used the fixed area and put in a media box to display the logo, linking the logo to this page so clicking on it form any page in the site takes you to this page instead of the splash page, with the navi bar and no logo. Used css to poition things properly.

 

Worked out great. Thanks for the help -

Perry

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

No problem Perry, happy to help.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • lionel1
      By lionel1
      Hi,
      i try to put some images (Logos) in the Agency module / clients module section
      But i only can put 6 logos though the module propose to add more item
      Thanks for ur help
      Lionel 
      Capture d’écran 2017-06-27 à 20.55.27.png 
    • decmech
      By decmech+
      Hey Guys,
      Having some issues with the dropdowns for the Navi in DMS. For some reason I can't have any more than 2 levels in the dropdown. The cursor is hovering over RPAS Training (and the arrow to indicate more is visible) but no matter what browsers, it never shows up. Also inspecting the HTML shows that the additional fields are not there.
      I have inspected the PHP and cannot see anything that is limiting the number of levels. Any assistance to get the additional levels showing would be great.

    • Michael Kummer
      By Michael Kummer+
      Hi guys,
      I just migrated from DMS to PageLines Platform 5 and noticed that after uploading my fav icon to Site Images, the default PageLines icon is still showing in my browser as well as in the HTML source code.
      The page in question is www.michaelkummer.com - is there anything else I need to do in order to update the favicon?
      Thanks
      Michael


    • jeomiland
      By jeomiland+
      Hi guys. Just now trying out Platform 5. I like the reletive simplcity of the new interface but there are things I'm used to in DMS that I'm not seeing yet in 5. Is there a good manual, documentation, video series about some of the basics?
      In particular, I've got a simple navigation menu, created the standard way in WP menus section with several top level parents, then 3-4 children menu items below a couple parent items. Have them moved to the right to create the standard parent-child relationship but all I see on the page is the parent level items - no dropdown!. So I changed themes from Platform5 to the standard 2015 default theme and now I see absolutely no menu at top, except for the mobile (hamburger?) icon.
      In DMS, one had Navi and Navbar, etc sections and each would work differently and give different results. How do you work the menu system in 5? And how get different results ?
      thanks
    • Kedark
      By Kedark+
      Hi,
      how to set the menu navi:
      - The background color when you expand a submenu,
      - Background color on mouseover,
      - The color of the text,
      - Width of submenu
      Please help, nowhere in the forum I have not found the answers to these questions ..
      Regards
      RKA
       
×