Hi i would like to make a banner (like adsense java) on al icon xtheme post (not page).
How can i fix this? Thank you for the help, i love this theme/support
Greetings Wouter
Hi there,
If you want to have the banner to the posts page you need to install the Revolution Slider plugin. Then add your banner using that plugin. You can add one Slider which will act as a banner.
Then you need to install a Child Theme and add the code below to functions.php file of the Child Theme:
// Add a custom blog header image
// =============================================================================
add_action('x_before_view_integrity__landmark-header', 'custom_blog_header01');
function custom_blog_header01(){
if (is_single()) {
echo do_shortcode('[rev_slider alias="about"]');
}
}
In the code above change integrity
with the name of the stack which you use and about
with the slug name of the slider you created in the Revolution Slider.
Thank you.
Thank you for the fast response
Unfortunately it dont work…
This is the code:
Do you know what the issue can be?
Thanks
I tried to only add an image slide, but that won’t work either
I use ICON and added this:
// Add a custom blog header image
// =============================================================================
add_action(‘x_before_view_icon__landmark-header’, ‘custom_blog_header01’);
function custom_blog_header01(){
if (is_single()) {
echo do_shortcode(’[rev_slider alias=“offerte”]’);
}
}
Normal selected slides are working fine…
Is it possible to add it without revolution slider?
Because rev. slider is slowing down the site i would love an solution like this:
Hey There,
To resolve your issue, assuming that your child theme is set up, please add the following code in your child theme’s functions.php file
// Add a custom blog header image
// =============================================================================
add_action('x_before_view_integrity__landmark-header', 'custom_blog_header01');
function custom_blog_header01(){ ?>
<?php if (is_single()) : ?>
<!-- Place the following line at the location you wish to display the form on your page. -->
<div data-origin="https://partners.skydreams.com"
data-authcode="##########"
data-sd-iframe="b2c" data-version="3"></div>
<?php endif; ?>
<?php }
function add_customblog_headr_script(){ ?>
<!-- Place the following line near the bottom of the page, right
before the </body> tag. -->
<script type="text/javascript"
src="https://partners.skydreams.com/bundles/sdaffiliate/min/js/iframe.js"
async="async"></script>
<?php }
add_action('wp_footer', 'add_customblog_headr_script');
// =============================================================================
We would loved to know if this has work for you. Thank you.
I’ll try ASAP, thnxs for your time and effort once again
I will let you know!
No problem.
We’re glad we were able to help you out.
Sorry, didnt worked…
(I tryed to change “integrity” to "icon"to )
Hey There,
To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password
Thank you.
Thanks, i did sent.
Did you received it?
Hi there,
From that code, please change this line
<?php if (is_single()) : ?>
to this
<?php if (is_singular('post')) : ?>
The footer function works, except the main banner code.
Thanks!
Once again thanks for the support
Unfortunately this code don’t work:
// Add a custom blog header image
// =============================================================================
add_action(‘x_before_view_icon__landmark-header’, ‘custom_blog_header01’);
function custom_blog_header01(){ ?>
<?php if (is_singular('post')) : ?>
<!-- Place the following line at the location you wish to display the form on your page. -->
<div data-origin="https://partners.skydreams.com"
data-authcode="976618af8ffc7bb4c530a44943a22ab2"
data-sd-iframe="b2c" data-version="3"></div>
<?php endif; ?>
<?php }
function add_customblog_headr_script(){ ?>
<!-- Place the following line near the bottom of the page, right
before the </body> tag. -->
<script type="text/javascript"
src="https://partners.skydreams.com/bundles/sdaffiliate/min/js/iframe.js"
async="async"></script>
<?php }
add_action('wp_footer', 'add_customblog_headr_script');
// =============================================================================
Hi there,
It will not really work since landmark isn’t supported by icon stack. Try changing this line
add_action('x_before_view_icon__landmark-header', 'custom_blog_header01');
with this
add_action('x_after_view_global__slider-below', 'custom_blog_header01');
Thanks!
That did it!! I’m so greatfull!!!
can you tell me how to add a css class?
Thank you for time and effort
Hi There,
Where you want to add a CSS class?
Let us know more details.
Thanks!
Hi,
I would love to set max height and maybe background color of the custom header
thnxs!
Hello There,
In adding a custom class, you may modify the code and use something like this:
function custom_blog_header01(){ ?>
<div class="my-custom-content">
<?php if (is_singular('post')) : ?>
<!-- Place the following line at the location you wish to display the form on your page. -->
<div data-origin="https://partners.skydreams.com"
data-authcode="976618af8ffc7bb4c530a44943a22ab2"
data-sd-iframe="b2c" data-version="3"></div>
<?php endif; ?>
</div>
<?php }
We just simply wrapped the code with a div that has a class in it. And you can use the class to set a maximum height and even a background color like:
.my-custom-content {
max-height: 350px;
background-color: red;
}
Feel free to change the color and height. Hope this helps.
Perfect!
Thnxs for the great support and keep on the good work
You are welcome!