Tagged: x
-
AuthorPosts
-
August 23, 2016 at 10:21 pm #1144151
kik4adogParticipantIs there a quick and easy way to add a banner to all of the pages/posts on my site via a code? For instance, I have a sponsor who hosts their own banner, so currently I just install the code onto the specific page of my site where I want it. But they have communicated to me that they would like it on every page/post of my site. The code I am using is
<a href="http://www.mousefantravel.com?apid=aatm"> <img src="http://mei-banners.s3.amazonaws.com/b/red_lg.gif" /></a>I tried using the “Text” widget in Header 1, but I didn’t see where it did anything. Then I tried Header 2 and Header 3, and still nothing. Finally I tried Footer 1, and I still didn’t see any changes.
My site is located at http://www.allaboutthemousecentral.com.
Thanks in advance
August 24, 2016 at 7:06 am #1144560
FriechModeratorHi There,
Thanks for writing in! Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.
Then add this on your child theme’s functions.php file.
add_action( 'x_before_the_content_begin', 'add_to_everypage' ); function add_to_everypage() { ?> <div class="x-container max width center-text"> <a href="http://www.mousefantravel.com?apid=aatm"><img src="http://mei-banners.s3.amazonaws.com/b/red_lg.gif" /></a> </div> <?php }Hope it helps, Cheers!
August 24, 2016 at 8:40 pm #1145701
kik4adogParticipantThis worked great! Thank you!
August 24, 2016 at 11:00 pm #1145999
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1144151 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
