gdub01 0 Report post Posted July 24, 2011 I'm having trouble adding a hook. I installed the plugin 'vote it up' and it asks to submit this code into single.php or index.php: <?php DisplayVotes(get_the_ID()); ?> So I know that I want to add it as a hook to the base theme instead of modifying the platform pro theme. So I tried to follow the example documentation in functions.php in editing the platformbase theme and I wrote this: add_action('pagelines_before_postsinfo', 'DisplayVotes'); function DisplayVotes(get_the_ID()); ?> But I'm getting a parse error. Can you help me? Thanks, Gavin Share this post Link to post Share on other sites
catrina 103 Report post Posted July 24, 2011 The hook you created isn't written the correct way. Here is the correct format: //add_action('pagelines_branding_icons_end', 'add_icons_to_branding'); // function name function add_icons_to_branding(){ <?php } // end function[/code] This code you wrote: [code]function DisplayVotes(get_the_ID()); ?> ...must be replaced with: function display_votes Also, "DisplayVotes" in this code: add_action('pagelines_before_postsinfo', 'DisplayVotes'); ...must be replaced with display_votes Notice that the name of the function (display_votes) is the same in the top line and the fourth line (just like in the example at the top). Does that make sense? 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