Jump to content
outtareach

What would be best way to alter header

Recommended Posts

outtareach

My client wants me to make the header link in two places. So I need to add two divs in the header.What would be the best place to edit this? I see header.php but not sure if I need to put the in there or in another file. Any help would be appreciated.

Share this post


Link to post
Share on other sites
Danny

Hi,

You shouldn't make any changes to header.php or any core files as odd things will most likely happen. If you wish to add another link to your header, you will most likely want to use a hook. I recommend you install the Action Map plugin from the store, find the correct hook location and then add your code to the functions.php file.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
outtareach

thanks for the helpful solution. Basically I have to take the header and make it link to two different areas. The logo linking to the homepage and the other half linking to a section of the site. So I guess I need to break the image in two and add the links but which way do you think would be an easier solution?

Share this post


Link to post
Share on other sites
catrina

Breaking the image into two and adding links would be the best. You can't make one image link to two places unless you used an image map, which wouldn't be the easiest solution.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
outtareach

Thanks but yeah I understood that part but was talking about the two solutions offered and which would offer best solution for adding both links.

Share this post


Link to post
Share on other sites
outtareach

It's also worth mentioning that you can customize core sections like the branding section (if that's what you're using in the header) by copying the specific section's folder from the Pagelines sections folder into your child theme's "sections" folder (just create one if there isn't a folder there yet). From there you are free to customize the section however you'd like without being at risk of losing your customizations next time the framework is updated. Kind of like child themes for sections. If you decide to go this route, I would recommed you disable the core's version of the section from under Pagelines > Store > Sections > Core Framework to prevent any possible conficts.

Depending on where you need to add the extra link, a hook may be a much quicker and easier solution, but I just thought I'd mention another way :)

I did this and it now functions perfectly. This was cool because it was my first time really customizing something and it wasnt hard at all. If I wanted to go simply with a hook where would this be initiated?

Share this post


Link to post
Share on other sites
Rob

Into a functions.php located either in the child theme or in pagelines-customize/functions.php.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Rob

The topic was marked as resolved.


Former PageLines Moderator, Food Expert and Raconteur

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


  • Similar Content

    • Kedark
      By Kedark+
      Hello,
      I apologize for the trivial question, but I can not deal with it. How do I turn off the display of a distinctive image on the page? (I have to add it because I use plugins that use it), but as I display the page, I do not want it to be visible (and appears above the subject.).
      Probably a cliché but I can not deal with it. Therefore, a request for help.
      Regards
      RKA
    • mtaus
      By mtaus
      I have added a Lax section on the footer of this site: http://www.ics-law.org.php72-38.lan3-1.websitetestlink.com/ but the background image is not displaying. When I first add the image it appears in the background, but then after saving and reloading it is gone even though the thumbnail indicates it's still there. Screenshot attached.
      Any suggestions?

    • mtaus
      By mtaus
      I'm trying to add a Careers page to a site to display job openings. The plan is to create a Post using a subcategory 'Careers' and then display those on the page. All of the post sections in PL seem to include images and there's no obvious way to remove them or include an excerpt from the post. 
      Any suggestions?
    • chamois_blanc
      By chamois_blanc+
      Hello,
      Shouldn't the image PL5 component be using the srcset/picture css directives to pick the correct size for an image? or it does already and I don't know how to use it? Thank you for any advice or enlightenment.
    • Paul
      By Paul+
      I was surprised to see I had no menu today - out of the blue - its actually moved to the bottom of the page!  After hours of fiddling and disabling every single plugin, leaving just plagelines the issue is still present.  See video for a basic text box - I moved it into the head and it jumps to the bottom and shows just above the footer but below the main content.  I have a temp fix by placing the menu into the first row on the main content but it does mean other than my home page, all other pages have no menu.  A quick fix is very urgent for this bug.
      https://thelaptopfixers.com
       
       
×