• 0

DMS 2 Make the logo link to another page in the site


Question

Posted · Report post

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

7 answers to this question

  • 0

Posted · Report post

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
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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>

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

No problem Perry, happy to help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now