- This topic has 3 replies, 3 voices, and was last updated 9 years, 3 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
I'm trying to insert a newsticker php code in the header of the theme. However... there is no "header.php" file for that theme. I tried to enter it in the Genesis settings in "Enter scripts or code you would like output to wp_head():" but unless I'm missing some tags, it's not showing.
So I have two questions:
1- where do I insert header bound php tags when there is no header.php?
2- how do I control the location of that script on the page? I'd like it to show below the slider.
Here is the site: http://thresholdpublications.com/ortzion3/
I've searched but haven't found answers that I could apply. If you know where I should look, I'd be grateful!
If you need the script to be called before the closing </head> tag, the box in theme settings is the correct place.
In most cases, you should have two pieces of code - one for the header, and one that actually outputs the ticker on the page. If that's the case, you would put the one in the header scripts box, and the other in a widget area below the slider (you may need to add a widget area if there isn't one there).
Thank you Andrea!
So I have this php code to insert:
<?php jnewsticker_display( 0 ) ?> in the Genesis settings. Check.
And you're correct, there is another step: insert the widget under the slider's widget. Check.
Here is the ticker I'm using: http://codecanyon.net/item/jnewsticker-for-wordpress/2506620
You control the position on the page using a genesis hook.
Template tags are more efficient than shortcodes.
Always include if ( function_exists() because the function won't try and execute if the plugin is deactivated or the function is removed.
© 2023 WPEngine, Inc.