Community Forums › Forums › Archived Forums › General Discussion › Trouble with installing a plugin
- This topic has 5 replies, 2 voices, and was last updated 9 years, 11 months ago by vividexposures.
-
AuthorPosts
-
June 5, 2014 at 8:21 am #108156vividexposuresMember
I am using the Epik theme and the latest version of Genesis. I am trying to get the Linko AllWebMenus Pro plugin to work. The plugin tries to add some linking code to the header.php file in the Genesis theme folder. It puts it in the wrong spot and I need to do it manually preferably in Simple Hooks so I can upgrade Genesis and not lose any customizations. If I activate the plugin it causes the site to not display.
<?php if
function_exists('AWM_generate_linking_code'))AWM_generate_linking_code();
?>',I was able to get it to work at some point by removing the "<?php " and I
had to add a ) if I am not mistaken. I had to enter it in this section of the header.php when it did work:do_action( 'genesis_before_header' );
do_action( 'genesis_header' );
I think I put it here
do_action( 'genesis_after_header' );Here is the error that gets generated if I activate the plugin:
[04-Jun-2014 14:52:35 UTC] PHP Parse error: syntax error, unexpected
'AWM_generate_linking_code' (T_STRING), expecting ')' in /home/vividexp/public_html/torchsource/wp-content/themes/genesis/header.php on line 24I would like to be able to use this plugin on other Genesis sites and need a good way to add that linking code. The developer says it needs to go right after the body tag. Any help would be greatly appreciated. I am not a programmer 😉
http://www.vividexposures.com/torchsource/June 5, 2014 at 10:16 am #108168Brad DaltonParticipantThat code is broken as it has been embedded incorrectly and cannot be tested like that. http://www.studiopress.community/faq/#code
June 5, 2014 at 10:38 am #108171vividexposuresMemberThanks for the heads up on how to share code on the forums 🙂
<?php if function_exists(‘AWM_generate_linking_code’))AWM_generate_linking_code(); ?>’,
That is what it is trying to add by default. Their tech support had me change the following which didn't work, but didn't generate an error.
<?php genesis_markup( array( 'html5' => '<body %s> <?php if (function_exists('AWM_generate_linking_code'))AWM_generate_linking_code(); ?>, 'xhtml' => sprintf( '<body class="%s">', implode( ' ', get_body_class() ) ), 'context' => 'body', ) );
Into:
genesis_markup( array( 'html5' => '<body %s>' if (function_exists('AWM_generate_linking_code'))AWM_generate_linking_code(), 'xhtml' => sprintf( '<body class="%s">', implode( ' ', get_body_class() ) ), 'context' => 'body', ) );
June 5, 2014 at 11:01 am #108176vividexposuresMemberJune 5, 2014 at 11:22 am #108179Brad DaltonParticipantJune 5, 2014 at 11:26 am #108181vividexposuresMemberThanks again Brad!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.