WordPress.org

Ready to get started?Download WordPress

Forums

Mobile Theme Featured images for Jetpack
[resolved] Messes up iPad browsing (12 posts)

  1. zoecorkhill
    Member
    Posted 1 year ago #

    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/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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!

  3. zoecorkhill
    Member
    Posted 1 year ago #

    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 just Handmade 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>

  4. zoecorkhill
    Member
    Posted 1 year ago #

    Should it even be outputting anything on the iPad anyway?

    The iPad uses the full theme, not the mobile theme as on my iPhone.

  5. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    You seem to be using a custom title function.

    Could you remove this the_titlesmall(); function, and replace it with the_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.

  6. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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>

  7. zoecorkhill
    Member
    Posted 1 year ago #

    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??

  8. zoecorkhill
    Member
    Posted 1 year ago #

    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

  9. zoecorkhill
    Member
    Posted 1 year ago #

    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 the jetpack_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' );
  10. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Thanks.

    I have updated the plugin.

  11. ffrwjr
    Member
    Posted 1 year ago #

    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

  12. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    @ffrwjr The problem reported by the OP was solved in version 1.3. Could you try updating to the latest version of the plugin?

    If that doesn't help, please start a new thread here, and let me know your site URL so I can have a look! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.