Banner Section to right of Logo in News Pro

Community Forums Forums General Discussion Banner Section to right of Logo in News Pro

This topic is: not resolved

This topic contains 14 replies, has 3 voices, and was last updated by  dpalme 8 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #77279

    dpalme
    Participant
    Post count: 18

    How 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?

    #77283

    braddalton
    Participant
    Post count: 9415

    Add the HTML for the banner to the header right widget area in a text widget.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #77312

    dpalme
    Participant
    Post count: 18

    Thanks, 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?

    #77335

    nutsandbolts
    Moderator
    Post count: 3128

    The 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, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #77401

    dpalme
    Participant
    Post count: 18

    Would this same code apply for adding php to a page?

    #77408

    nutsandbolts
    Moderator
    Post count: 3128

    If 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, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #77497

    dpalme
    Participant
    Post count: 18

    I 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?

    #77500

    dpalme
    Participant
    Post count: 18

    Well the php isn’t working in the widget on the page….

    #77501

    nutsandbolts
    Moderator
    Post count: 3128

    Can you paste in the PHP you need to use?


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #77503

    dpalme
    Participant
    Post count: 18

    Its 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.

    #77504

    dpalme
    Participant
    Post count: 18

    Well 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…

    #77593

    dpalme
    Participant
    Post count: 18

    I 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.

    #77598

    dpalme
    Participant
    Post count: 18

    got 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 :) )

    #77599

    nutsandbolts
    Moderator
    Post count: 3128

    Woohoo! 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)! :D


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #77601

    dpalme
    Participant
    Post count: 18

    LOL 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.

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.