This topic has 9 replies, 5 voices, and was last updated 10 years by Abe.

  • Author
  • #5030
     aztlanla
    Participant

    Hi, I want to add a 728×90 Ad Banner on the main page right under the drop down menus and above the search box. I was editing the header.php and was not able to get it in that position.

    I tried using Simple Ads Manager, but it won’t allow to place the ad in that location only in the sidebars.

    Thanks,
    Rogelio

    #5087
     SQadmin
    Keymaster

    HI, You can add it at the end of header.php. If you have a shortcode to render, use it with php like this:

    <?php echo do_shortcode('[my_shortcode]');?>

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #5153
     aztlanla
    Participant

    I was able to place the banner code near the bottom of the header.php file.

    I put it right before this line.

    “<div class=”row just-after-header”>”

    #6964
     dudau
    Participant

    Is it possible to display a 728×90 banner only for logged in users, and the banner to be different according to member profile? for instance, I have a site for models and photographers, I would like to display a certain banner for logged in photographers and another banner for logged in models. And if the visitor is not logged in, then don’t display any banner at all.
    Would that be possible?

    #6999
     SQadmin
    Keymaster

    You need some custom code to accomplish that. where do you want to put the banner?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #7017
     dudau
    Participant

    Maybe in the header, just above the menu? But I think 468×60 would be more suitable for that place.

    #7068
     SQadmin
    Keymaster

    Hi, You need some PHP and HTML knowledge
    The PHP code for checking a logged in user field is like this and it has to be adapted and goes in header.php and

    COPY CODE
    
    $current_user = wp_get_current_user();
    $current_user_id = $current_user->ID;
    $usertype = xprofile_get_field_data('User type', $current_user_id);
    if ($usertype == 'Photo') {
    	echo '<img src="" />';
    }
    elseif ($usertype == 'Model') {
    	echo '<img src="" />';
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #7099
     dudau
    Participant

    Thank you, I’ll try to insert it and will follow up with the results.

    #14243
     rudik2
    Participant

    It is possible to create a widget in header for only members? For example for use 728×90 banner

    #14594
     Abe
    Keymaster

    Hi, Sorry for the late reply. You need to edit header.php and add wrap the banner in a php conditional for logged in users like:
    <?php if (is_user_logged_in()) { ?> put the banner here <?php } ?>

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

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

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?