Jump to content


Photo
- - - - -

Add php code to brand nav


  • Please log in to reply
6 replies to this topic

#1 Martin Bay

Martin Bay

    Super Member

  • Members
  • 128 posts
  • LocationDenmark
  • Framework Version:Latest :)
  • Country: Country Flag

Posted 18 October 2012 - 09:12 AM

I want to add this to the brand nav section? Any help would be appreciated? I've tried to add a hook but can't seem to get it working?

Please Login or Register to see this Hidden Content



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 15194 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 October 2012 - 10:37 AM

Hi,

What you could do is create a Child of the Brandnav and add your code there.

To do this, download a fresh copy of PageLines Framework from your Launchpad and then copy the brandnav section folder and then upload it to your websites child theme section folder.

If you're not using a Child theme, then add the child BrandNav section folder to /wp-content/plugins/pagelines-sections/

Then add your code.

#3 Martin Bay

Martin Bay

    Super Member

  • Members
  • 128 posts
  • LocationDenmark
  • Framework Version:Latest :)
  • Country: Country Flag

Posted 18 October 2012 - 12:56 PM

I've tried the below code as well but it will not work. I added the above code to header.php which works. Not sure why it will not work with the above method. I get internal error.

Please Login or Register to see this Hidden Content



#4 etcio

etcio

    Advanced Member

  • Members


  • 68 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 18 October 2012 - 10:24 PM

What's the internal error?

I've tried the below code as well but it will not work. I added the above code to header.php which works. Not sure why it will not work with the above method. I get internal error.

Please Login or Register to see this Hidden Content



#5 Danny

Danny

    Is Awesome!

  • Moderators
  • 15194 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 October 2012 - 09:38 AM

Hi,

Editing core files is not recommend, if you wish to add custom code to a specific section, either create a child of the section using the instructions above or use a hook.

Editing any of the core files such as header.php, prevents us from providing support.

#6 Martin Bay

Martin Bay

    Super Member

  • Members
  • 128 posts
  • LocationDenmark
  • Framework Version:Latest :)
  • Country: Country Flag

Posted 22 October 2012 - 05:16 PM

I know I should add it in the Child theme and not edit core files. Im just not sure how I add it to the function.php (in the child theme) so it show up in the BrandNav section

The below tricks didn't do the trick?
"To do this, download a fresh copy of PageLines Framework from your Launchpad and then copy the brandnav section folder and then upload it to your websites child theme section folder."

#7 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 25 October 2012 - 12:51 AM

Hi there, you said you tried a hook previously but it didn't work. Which hook in the brand nav area were you applying the code to?

Hooks API list-

Please Login or Register to see this Hidden Content



Also check this post which goes through the process of putting a link into the header and could help. Just use the same process for your code.

Please Login or Register to see this Hidden Content


  • Martin Bay likes this