Tagged: x
-
AuthorPosts
-
November 5, 2016 at 9:05 pm #1245482
Joacim90ParticipantHi,
I have trouble with adding banners to my category pages. Isn`t x-theme supporting this feature?
How can i add banners to the category page without make custom css etc?November 6, 2016 at 3:40 am #1245692
Rue NelModeratorHello There,
Thanks for writing in! 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.
After the child theme is set up, please add the following code in your child theme’s functions.php file
function custom_banner() { if (is_category()) { echo '<div class="custom-banner"><img src="http://placehold.it/1200x600/ff00ff" title="custom banner" alt="custom banner"></div>'; } } add_action('x_before_view_integrity__landmark-header','custom_banner', 9999);Please be sure to change the image source with the correct path for your banner.
Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1245482 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
