Hi,
Now you can set the code directly in ad box using the header manager and set in header an ad box -> https://www.screencast.com/t/4Bej3HcGfH
Thank you!
It’s not reading the PHP correctly, I’m getting artifacts.
The code is <?php if (twitch_is_live('moarcookies')) { ?>
<div align="center" style="background-color:#c1711b; color:#fff; padding-left:10px; padding-right:10px;">See when we’re live! Join in the conversation and click on the Twitch icon in the lower right of the stream!</div><br /><div id="twitch-embed"></div>
<script src="https://embed.twitch.tv/embed/v1.js"></script>
<script type="text/javascript">
new Twitch.Embed("twitch-embed", {
width: "100%",
height: 480,
channel: "moarcookies",
allowfullscreen: true,
});
</script>
<?php } else { ?>
<?php } ?>
This, before the 9.7 update, worked fine and hid the content if I wasn’t live. Now it just shows up regardless.
Hi,
You can still set the code in header ad -> https://www.screencast.com/t/kaGjoE3xj this will be the result -> https://www.screencast.com/t/K3cZ33YJ0cE0
If is not what you mean, please provide some more details, also some screenshots would be very helpful.
Thank you!
Hi Calin,
While it shows up, part of the PHP code is using a plugin that’s called Twitch Conditional. That plugin hides that video from showing up if we’re not live. If we are, then it shows up.
So what you showed me in https://www.screencast.com/t/K3cZ33YJ0cE0 should not even show up. Either it’s there when I’m live or not when I’m offline.
This worked fine up until the update.
Hi,
Unfortunately we did not tested Twitch Conditional plugin and therefore, we cannot say for sure if it will work or not as expected with the theme, sorry! Also, we cannot provide support for untested plugins.
This is our list with tested plugins with our theme -> https://www.screencast.com/t/cmPkh9jba4sZ
Thank you!
Hi,
Unfortunately you can not add php code directly in theme, you need to set the php code with some php plugin in widgets ( https://wordpress.org/plugins/safe-php-code-widget/ ) and set this widgets in homepage tagDiv Composer -> https://www.screencast.com/t/SMwge3nN2HwW -> https://www.screencast.com/t/oE5S8fy4b
Thank you!