Community Forums › Forums › Archived Forums › General Discussion › Banner Section to right of Logo in News Pro
- This topic has 14 replies, 3 voices, and was last updated 11 years, 7 months ago by
dpalme.
-
AuthorPosts
-
December 5, 2013 at 2:48 pm #77279
dpalme
ParticipantHow do I configure the banner ad section in the news pro theme, I'm referring to the one that's just to the right of the logo?
December 5, 2013 at 3:06 pm #77283Brad Dalton
ParticipantAdd the HTML for the banner to the header right widget area in a text widget.
December 5, 2013 at 10:26 pm #77312dpalme
ParticipantThanks, do you have a preferred script for a rotating banner ad setup?
Also, I tried to add some php code to the html, but it didn't like that... is there a way to use php in the text widget?
December 6, 2013 at 5:16 am #77335nutsandbolts
MemberThe AdRotate plugin is a good one, and it's easy to use.
As for using PHP in a widget, you can do that after adding this to functions.php:
// Enable PHP in widgets add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ob_start(); eval("?".">".$html); $html=ob_get_contents(); ob_end_clean(); } return $html; }
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 6, 2013 at 12:44 pm #77401dpalme
ParticipantWould this same code apply for adding php to a page?
December 6, 2013 at 12:54 pm #77408nutsandbolts
MemberIf you want to add PHP to a page, you'd probably need to add a widget area to the page. I have a tutorial on how to do that: http://www.nutsandboltsmedia.com/how-to-add-a-widget-area-to-a-page-using-genesis/
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 6, 2013 at 10:12 pm #77497dpalme
ParticipantI assume that once I add the widget I'll need to add something like a text widget to the page and that will display everything correctly?
I followed the above instructions, they seem to be working ok, but I was wondering how I can suppress the page name?
December 6, 2013 at 10:20 pm #77500dpalme
ParticipantWell the php isn't working in the widget on the page....
December 6, 2013 at 10:33 pm #77501nutsandbolts
MemberCan you paste in the PHP you need to use?
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 6, 2013 at 10:44 pm #77503dpalme
ParticipantIts going to be a lot of code, I'm slowly building it out but basically I am trying to add a database call to display some data and plan on eventually formatting it to create links to other pages, with more data being called from a mysql database.
One of the items I'm trying to add up front is a jquery tabs display:
this is the first part of the call:
<head>
<meta charset="utf-8">
<title>jQuery UI Tabs - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<body>
and then the php follows that with a mysqli_connect call.December 6, 2013 at 10:46 pm #77504dpalme
ParticipantWell so far I've created a page template and that seems to work a little better and when I added the get_header it displayed the header like I wanted too... so maybe that's the better way of going...
December 7, 2013 at 8:05 pm #77593dpalme
ParticipantI got the header working with get_header(); but when I put in get_footer(); it displays in the wrong place, its showing up in one of the tabs, even though I have it in a div outside of the tab code.
December 7, 2013 at 8:12 pm #77598dpalme
Participantgot it!!
Was missing a table tag, of course I'm going to get rid of that eventually, but we're movin on up (playing the Jeffersons in the background 🙂 )
December 7, 2013 at 8:13 pm #77599nutsandbolts
MemberWoohoo! I've been following along, but haven't had much advice since I'm still not totally sure what you're doing. Crossing fingers that you get it worked out (and then come back to post a detailed tutorial for other people who may need to do something like this)! 😀
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 7, 2013 at 8:25 pm #77601dpalme
ParticipantLOL I have a jquery tabs script that I'm using to load table data from a mysql database. This way I can load all the data at the same time and preload the tabs....
Now, its a matter of layout issues.
I'll be happy to write a tutorial on this once I'm done.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.