Tagged: x
-
AuthorPosts
-
November 11, 2016 at 2:26 pm #1253706
JW & Co.ParticipantGood afternoon,
I am wondering if you could tell me how to place this image (http://webdeveloperandseo.joshuaweatherstone.com/wp-content/uploads/2016/11/Wallpaper3.jpg) above the navbar on webdeveloperandseo.joshuaweatherstone.com. I realize that I could create a slider and put it above the masthead, but that seems like the run around to the real solution and I would rather not take shortcuts.
Thanks,
JoshNovember 11, 2016 at 8:48 pm #1254119
Rue NelModeratorHello Josh,
Thanks for writing in! Do you want to have the image in all of the pages of your site or just the homepage? Because what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
If you only want to have the image in your homepage, please edit your homepage back in Cornerstone, go to the settings tab, Settings > Custom JS and insert the following custom js code
(function($){ $('<div class="custom-header-image" style="text-align: center;"><img class="x-img mtn mbn x-img-none" src="http://webdeveloperandseo.joshuaweatherstone.com/wp-content/uploads/2016/11/Wallpaper3.jpg"></div>').insertBefore( $('.x-navbar-wrap') ); })(jQuery);But if you want to have the image displayed site wide, (assuming the child theme is set up), please add the following code in your child theme’s functions.php file
// Add custom image above the masthead // ============================================================================= function add_custom_content_above_masthead(){ ?> <div class="custom-content-container x-container max width"> <!-- our custom content code here --> <img src="http://webdeveloperandseo.joshuaweatherstone.com/wp-content/uploads/2016/11/Wallpaper3.jpg" alt="My custom content"> </div> <?php } add_action('x_after_view_global__navbar', 'add_custom_content_above_masthead'); // =============================================================================We would loved to know which one of this has work for you. Thank you.
November 12, 2016 at 7:36 am #1254375
JW & Co.ParticipantThank you for being so thorough!
I only needed the first, but it was a success.Josh
November 12, 2016 at 8:14 am #1254403
ThaiModeratorGlad it worked 🙂
If you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1253706 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
