Jump to content


Photo
- - - - -

Another function.php question


This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1 highreach

highreach

    Advanced Member

  • Members

  • 79 posts

Posted 31 August 2012 - 10:56 AM

Hey Guys, function.php has been kicking my butt recently. Over the last few days I have gotten very good at breaking my site with functions.php, then going back and restoring the functions.php file to its original state. I have read a bunch on how to implement new code into functions php and have tried it in several places. Here is the latest (failed) attempt. If anyone has any ideas, please let me know. Thanks a bunch

#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17532 posts

Posted 31 August 2012 - 11:07 AM

Hi, Can you tell me what you want to add to your child themes function.php file please.

#3 highreach

highreach

    Advanced Member

  • Members

  • 79 posts

Posted 31 August 2012 - 12:00 PM

Hey Danny, Thanks for the quick response! I am looking to add this :

Please Login or Register to see this Hidden Content

I (hopefully) will give me a short description next to each of my products.

#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17532 posts

Posted 31 August 2012 - 12:53 PM

The best course of action would be to contact JigoShop support regarding this.

#5 highreach

highreach

    Advanced Member

  • Members

  • 79 posts

Posted 31 August 2012 - 01:17 PM

Thanks Danny, I'll be sure to do that and report back if I find anything. If anyone else knows what the issue is with my code (

Please Login or Register to see this Hidden Content

) Your joining the conversation would be much appreciated :)

#6 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts

Posted 31 August 2012 - 01:41 PM

PLEASE dont edit the main framework functions file, either use a chile theme or the customization plugin.

#7 Jenny

Jenny

    Advocate

  • Unicorn Store Dev

  • 2924 posts

Posted 31 August 2012 - 01:48 PM

Looking at the paste, you're missing the closing } in your function. Not sure other than that. PS. Simon means "child theme" ;)

#8 highreach

highreach

    Advanced Member

  • Members

  • 79 posts

Posted 01 September 2012 - 08:16 AM

Man, one little squiggly line is the different between taking my site offline and getting the code to work. @simple_mama , you are a genius. Thank you so much. @pross , I am editing the functions file found in wp-content/themew/paglines-template-theme. Is this bad?

#9 Danny

Danny

    Is Awesome!

  • Moderators
  • 17532 posts

Posted 02 September 2012 - 09:55 AM

Editing the Child theme like you mentioned above is the correct way to add custom code such as hooks to your site.

#10 highreach

highreach

    Advanced Member

  • Members

  • 79 posts

Posted 03 September 2012 - 04:36 AM

Thanks for the confirmation Danny!

#11 Jenny

Jenny

    Advocate

  • Unicorn Store Dev

  • 2924 posts

Posted 03 September 2012 - 01:25 PM

Glad to help @highreach :)