Messes up iPad browsing
-
I installed this on my blog and it all seemed to be working perfectly until I looked at my site on my iPad. The titles of each post were messed up & unreadable because it was inserting some code near my permalink.
I have had to disable the plugin.
It was on http://mamageek.co.uk – running a custom child theme of Starkers
http://wordpress.org/extend/plugins/jetpack-mobile-theme-featured-images/
-
The titles of each post were messed up & unreadable because it was inserting some code near my permalink.
Could you post that code here, so I can have a look?
Thanks!
No problem..
Where it should usually be:
<h2><a href="http://mamageek.co.uk/2013/01/22/handmade-with-love-by-mrs-miss-c/" title="Permalink to Handmade with love by Mrs & Miss C!" rel="bookmark">Handmade with love by Mrs &...</a></h2>
It was spitting out:
<h2><a href="http://mamageek.co.uk/2013/01/22/handmade-with-love-by-mrs-miss-c/" title="Permalink to Handmade with love by Mrs & Miss C!<img width=" 5472"="" height="3648" src="http://mamageek.co.uk/wp-content/plugins/lazy-load/images/1x1.trans.gif" data-lazy-src="http://mamageek.co.uk/wp-content/uploads/2013/01/SAM_0584.jpg" class="attachment-post-thumbnail wp-post-image" alt="Handmade by Mrs & Miss C"><noscript><img width="5472" height="3648" src="http://mamageek.co.uk/wp-content/uploads/2013/01/SAM_0584.jpg" class="attachment-post-thumbnail wp-post-image" alt="Handmade by Mrs & Miss C" /></noscript>" rel="bookmark">Handmade with love by Mrs &...</a></h2>
Which gives a visual of
" rel="bookmark">Handmade with love by Mrs &...
as the link text instead of justHandmade with love by Mrs &...
The code generating that is:
<h2><a href="<?php esc_url( the_permalink() ); ?>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_titlesmall('', '...', true, '33'); ?></a></h2>
Should it even be outputting anything on the iPad anyway?
The iPad uses the full theme, not the mobile theme as on my iPhone.
You seem to be using a custom title function.
Could you remove this
the_titlesmall();
function, and replace it withthe_title();
?You might also want to disable any other image plugins currently active on your site.
If any of this helps, let me know. I’d be happy to investigate further and fix any conflicts with other plugins.
Here is another idea, I think I just understood what the problem was.
Replace
<h2><a href="<?php esc_url( the_permalink() ); ?>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_titlesmall('', '...', true, '33'); ?></a></h2>
by
<h2><a href="<?php esc_url( the_permalink() ); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'starkers' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_titlesmall('', '...', true, '33'); ?></a></h2>
I need to use my custom title function for the site to display correctly. The Lazy Load plugin has no effect on it either way, I installed it this morning after I already disabled your plugin (I reenabled the plugin to post the above code)
My main confusion is why it’s even attempting to do anything on the iPad when it doesn’t use the mobile theme??
That code changed worked slightly – any post where the title has been truncated by
the_titlesmall
function displays correctly, but any where it is displaying the full title (as it is less than my character limit) has this:<h2><a href="http://mamageek.co.uk/2013/01/19/a-snowy-outing/" title="Permalink to A snowy outing" rel="bookmark">A snowy outing<img width="5472" ...<="" a=""></a></h2> <a href="http://mamageek.co.uk/2013/01/19/a-snowy-outing/" title="Permalink to A snowy outing" rel="bookmark"> </a>
This pushes the rest of the content for that post down – image at http://d.pr/i/USus
As I suggested the problem is that your plugin is looking for tablets – this isn’t necessary.
By commenting out your
tweakjp_is_mobile_or_tablet()
function and replacing it with thejetpack_check_mobile()
one, it only attempts to apply the filter when on a mobile device, rather than on mobile or tablet.// On Mobile? Let's add the Featured Image function tweakjp_maybe_add_filter() { if ( jetpack_check_mobile() ) add_filter( 'the_title', 'tweakjp_minileven_featuredimage' ); } add_action( 'wp_head', 'tweakjp_maybe_add_filter' );
Thanks.
I have updated the plugin.
I to am having this/similar problem. When I enable the plugin my Mobile Theme shows correctly. However if I choose View Full Site from any mobile device or ipad – the featured image for the Next and Prev post display the SAME Feature image for the current post along with the link at it’s full image size.
Any help would be appreciated. Plugin is disabled but can be reenabled for review.
Fred
- The topic ‘Messes up iPad browsing’ is closed to new replies.