Forum Replies Created
-
AuthorPosts
-
May 19, 2017 at 12:35 pm in reply to: Adding widget areas before & after single post content #796526
Yes this works, thanks!
I found out that the “if($context == ‘post’)” is the problem, it doesn’t work with ava_after_main_container but it works with ava_after_content. Is there any other hook which I could try, which would insert the code only to single post page before content?
Attached.
It works, but as I said, I don’t want a fixed pixel height. I’d like these columns to function as the standard Enfold columns with equal height based on the largest column.
See private content.
- This reply was modified 7 years, 7 months ago by teme.
May 16, 2017 at 10:49 pm in reply to: Add category as a CSS class to "Blog Posts" content element #794520Actually I was able to make that old example work, although the postslider.php had changed a bit since then, so everything seems to be fine now.
May 16, 2017 at 4:39 pm in reply to: Add category as a CSS class to "Blog Posts" content element #794086My original question is still unanswered… the code I linked earlier (from 2013) doesn’t work anymore, because the Enfold code has changed.
May 16, 2017 at 1:14 pm in reply to: Add category as a CSS class to "Blog Posts" content element #793893OK, thanks.
Yes, as I said before: I now changed the demo theme to Twenty Fourteen and the video & event listeners began to work correctly (same url as before). So currently Enfold theme isn’t in use, but when I activate it, the code doesn’t work anymore. The admin access is in the private content box.
I tried another example, which works fine with Twenty Fourteen theme, but when I put the code to Enfold Code Block, it displays nothing:
<!– 1. The <iframe> (and video player) will replace this <div> tag. –>
<div id=”player”></div><script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement(‘script’);tag.src = “https://www.youtube.com/iframe_api”;
var firstScriptTag = document.getElementsByTagName(‘script’)[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);// 3. This function creates an <iframe> (and YouTube player)
// after the API code downloads.
var player;
function onYouTubeIframeAPIReady() { player = new YT.Player(‘player’, {
height: ‘390’,
width: ‘640’,
videoId: ‘M7lc1UVf-VE’,
events: {
‘onReady’: onPlayerReady,
‘onStateChange’: onPlayerStateChange
}
});
}// 4. The API will call this function when the video player is ready.
function onPlayerReady(event) {
event.target.playVideo();
}// 5. The API calls this function when the player’s state changes.
var done = false;
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.ENDED) {
window.location.href = ‘http://www.google.com’;
}
}
function stopVideo() {
player.stopVideo();
}
</script>- This reply was modified 7 years, 9 months ago by teme.
Sorry, but I don’t quite understand your reply. If the code is wrong, why the exactly same code works when I’m using a basic WP theme? If there is a way to do this, could you please explain how I can get those Youtube event listeners to work in a page which is using Enfold theme?
I now changed the demo theme to Twenty Fourteen and the video & event listeners began to work correctly (same url as before).
- This reply was modified 7 years, 9 months ago by teme.
August 31, 2016 at 6:38 pm in reply to: .header-scrolled class not available in header with custom pixel value #680273Link and login info are attached to the private content field.
March 11, 2014 at 7:19 pm in reply to: WPML & wrong language pages in "Button Link" dropdown #235786It’s fixed now :) It was just an issue with browser cache or cookies or something like that.
-
AuthorPosts