Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1307333
    JfantasyBooks
    Participant

    Hello,

    Details:

    Name: JFantasyBooks
    Site: Fantasy-Updates
    Site Url: https://fantasy-books.live
    WordPress Version: 4.7
    X Version: 4.6.4
    Cornerstone Plugin Version: 1.33

    Problem:

    1. I would like to add a banner or an ad to my homepage header

    2. I also want to add it so that it appears as a banner above every posts

    3. If I want to change the banner so it is different by category, can you show me how to do that as well?

    Can you help me with this?

    #1307452
    Rupok
    Member

    Hi there,

    Thanks for writing in!

    #1. You can use Customize > Header > Topbar Content to place content.

    #2. You need to do it manually for each post or find a plugin that do such thing. It’s not usual for X or WordPress.

    #3. It could be done with plugin or custom development and it would be out of our support scope.

    Cheers!

    #1307461
    JfantasyBooks
    Participant

    Unfortunately,

    I am looking to place it below the navbar. Like if you were to add a slider. The header widget for the stack I have is as a small button on the top to see it.

    #1307677
    Friech
    Moderator

    Hi There,

    For #1 and #2, you can add this on your child theme’s functions.php file.

    /**
    Add banner on Blog page and single posts
    */
    function custom_banner() { 
     if(is_home() || is_single()): ?>
        <div class="custom-banner">
          <div class="x-container">
           <img class="x-img" src="YOUR BANNER URL HERE" alt="banner" />
          </div>
        </div>
      <?php endif; 
    }
    add_action('x_after_view_ethos__breadcrumbs','custom_banner', 30);

    Replace the phrase YOUR BANNER URL HERE with your actual image URL.

    #3 Dynamic banner could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

    Thanks for understanding.

    #1307773
    JfantasyBooks
    Participant

    Thanks. You guys are great!

    And I’ll look into #3.

    #1308069
    Prasant Rai
    Moderator

    You are most welcome. 🙂

  • <script> jQuery(function($){ $("#no-reply-1307333 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>