jenvander
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: No changes to my site, suddenly getting errorsWill do, thanks!
Forum: Fixing WordPress
In reply to: Need to add attributes to a video iFrame for mobileFor some reason I didn’t get the notification on your response. Yes indeed it was the CSS you mentioned. I changed the “none” to “initial”. Thanks!
Forum: Fixing WordPress
In reply to: Need to add attributes to a video iFrame for mobileI found that function. It was in the theme’s functions.php. I made the modifications.
However, mouse clicks do not interact with the video. I can load that iFrame into a page on my own separate site and interact with it. So my next problem is figuring out why interactions don’t work on this site–which would explain why mobile doesn’t work. Since mobile doesn’t allow autoplay, the user needs to touch (click), but clicks aren’t registering. Anyone have any ideas?Forum: Fixing WordPress
In reply to: Need to add attributes to a video iFrame for mobileThe reason we are using the custom fields is to embed the videos into headers. Thus, the iFrame code is not in a page or post where I can manually edit it. It’s being generated by the custom field. Here’s the code from the page template–could this be modified to add the attributes?
<?= get_fullwidth_iframe(get_field(‘video’)) ?>
Not sure where get_fullwidth_iframe comes from… that might be a clue to the aforementioned mystery. I apologize, but I’m coming in and supporting a site that I didn’t write, so it can be some detective work to find things. I appreciate your help.
Forum: Fixing WordPress
In reply to: Need to add attributes to a video iFrame for mobileThanks for responding Andrew, nice to meet you 🙂
I need the iFrame to contain two additional attributes: class=”youtube-player” type=”text/html”.
It would appear that other custom attributes are being applied to the iFrame, attrs that are not specified in the custom field interface, so there’s something going on in a php file somewhere, and I’m not quite sure where. It’s not in functions.php. I suppose if I could solve this mystery, I could add my attrs there 🙂
The filtering code that I added to functions.php is as follows:
/**
* Add a filter to place attributes on oEmbed iFrames, necessary
* for videos to work on mobile devices. The field editor for
* oEmbed does not provide a mechanism for added attributes.
*
* @since 4.7.0
*
* @param string $iframe The original iFrame tag string.
*
* @return string $iframe The modified iFrame tag string.
*/
function add_iframe_mobile_attrs($iframe){
if($iframe) {
$attributes = ‘class=”youtube-player” type=”text/html”‘;
$iframe = str_replace(‘></iframe>’, ‘ ‘ . $attributes . ‘></iframe>’, $iframe);
return $iframe;
}return false;
}/**
* Add a filter to place attributes on oEmbed iFrames, necessary
* for videos to work on mobile devices. The field editor for
* oEmbed does not provide a mechanism for added attributes.
*
* @since 4.7.0
*
* @param string $html The original html string.
* @param string $url Original URL.
* @param string $attr Original attributes.
* @param string $post_id The id of the post where the iFrame is found.
*
* @return string $html The modified html string.
*/
function my_embed_oembed_html($html, $url, $attr, $post_id) {
if($html) {
return add_iframe_mobile_attrs($html);
}return false;
}add_filter(’embed_oembed_html’, ‘my_embed_oembed_html’, 99, 4);
I’ve filed both tickets.
Will do. I have another issue I’ll enter in there separately, it’s with the plugin’s wp-admin UI. Lower priority though, since it’s merely a difficulty but doesn’t actually cause problems on the site itself.
I just noticed another issue; the thumbnails are not the size they are supposed to be. They are set to 100×39 but dev tools inspection shows they are 39×15.
Forum: Fixing WordPress
In reply to: Problem with WordPress ImporterI don’t think it’s special characters. This happens only with posts that have attachments. The attachments are never downloaded from the remote server. It just hangs on the attachment download and eventually times out.
Forum: Fixing WordPress
In reply to: Problem with WordPress ImporterHi! I wonder if I can pick your brain again 🙂
So, there is no hosting issue according to HostGator, and the theme developer sees no reason it cannot work with the hosting either. I have done a bit more detective work and found that the attachement_url directives in the XML aren’t working at all. In other words, not a single one downloads–it’s getting stuck on the very first one. It’s just timing out because it simply cannot download (or perhaps cannot upload to the WP site) the attachment at all. It’s a very small attachment (33KB), so this is not a resource limit issue. I downloaded it manually, so the URL is certainly reachable and responds instantly.
Could the importer be failing to access the storage and thus unable to upload the downloaded image to the WP site? This is a self-hosted site–are there some settings that I need to check?
Forum: Fixing WordPress
In reply to: Problem with WordPress ImporterNone of the files it’s downloading are larger than a handful of KB, and there only a few of them as it is. Also, why would the 5-minute timeout halt after 3 minutes?
Are there any logfiles that could shed some extra light? This site is hosted via hostgator and I have access to the cPanel.
Yes, the support team is assisting me right now. Thanks!
The response was: sliders will not be deleted when the free version is deleted. Yay!
Thanks.
Thanks!