Jump to content
outtareach

What would be best way to alter header

Recommended Posts

outtareach    3
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    1,327
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    3
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    103
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    3
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    3
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    547
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    547
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

    • BentleyD
      By BentleyD+
      Hey there,
       
      I am working on BentleyRolling.com. I used grams on MoonbodySoul.com and all the images are cropped to a square, whether they are square or 4:5 when posted on instagram, they still get cropped to a square. This looks way better than some being squares and some being 4:5. Did something change since I designed MoonBodySoul.com with Platform5? Can you help me crop all images to a square on BentleyRolling.com 
       
      All the best,
       
      Bentley
    • cstudio
      By cstudio
      How do I control the lightbox effect on the plugin "popthumbs"?  On mobile, it opens up much to small then when expanded it opens to large.  I would like to control the the lightbox to like 90% of the viewer window but I can't figure out how/where to control that.
      Site example

       
      Thx
    • flourishdesignstudio
      By flourishdesignstudio
      Hello,
      I have an older site that was built using PageLines several years ago (prior to the release of DMS). I wanted to leverage some of the power of your new PL5 plugin but the theme prevents be from adding any generated custom sidebars to the theme (through the drag and drop interface) and does not allow me to add any PL5 sections/containers/etc to the header or footer. Is there any way to easily override that or am I stuck only using PL5 in the content areas of the site?
      Thanks so much for the help!
    • Queue-it
      By Queue-it+
      Hi,
      I am using pl-section-journey and hiding most of the images. When running the page via google speed insights, it tells to optimize all the images that are in this plugins default. (e.g. https://queue-it.com/wp-content/plugins/pl-section-journey/images/drawer-5.jpg ) Like this one that is not visible on the website, but is a part of the plugin and comes up in google insights.
      I've deleted all the images in the plugin, but they still seem to come up. Ref. this page: queue-it.com/features
    • JP
      By JP+
      Hello,
      How can you set the translations with platform5, the parts that are not in pages or posts? Texts and images…
×