WordPress.org

Ready to get started?Download WordPress

Forums

Mobile Theme Featured images for Jetpack
[resolved] Placing Featured Image Between Title & Content (8 posts)

  1. Liltiger
    Member
    Posted 6 months ago #

    Hi,

    I just activated this plugin and was wondering if it was possible to put the featured image in between the title and the content vs above the title and content. Is there a function that I could use?

    And I'm having a memory fart, but wasn't the featured image built into Minieleven and popped up under the title way back in the day? Or did all the images in a post just populate in the loop?

    http://wordpress.org/plugins/jetpack-mobile-theme-featured-images/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 6 months ago #

  3. Liltiger
    Member
    Posted 6 months ago #

    Sorry for the late reply, but thanks!

  4. Liltiger
    Member
    Posted 6 months ago #

    Hi again,

    I figured out how to get the title above the featured image, but it shows the same featured image twice - one above and below the title. Here's the modified code. Could I get more direction? Thanks again!

    /*
     * Options page
     */
    add_action( 'admin_init', 'jp_mini_featured_init' );
    add_filter( 'the_title', 'jp_mini_featured_init' );
    
    // Init plugin options
    function jp_mini_featured_init( $title ) {
            $tweak = has_post_thumbnail() && in_the_loop();
            $featured_content = ( $tweak ) ? get_the_post_thumbnail() : '';  
    
            return $title . $featured_content;
    
            add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'jp_mini_featured_action_links' );
    
    	register_setting( 'jp_mini_featured_options', 'jp_mini_featured_strings', 'jp_mini_featured_validate' );
    
    	// Add settings to the Minileven Options page
    	add_action( 'jetpack_module_configuration_screen_minileven', 'jp_mini_featured_configuration_load' );
    	add_action( 'jetpack_module_configuration_screen_minileven', 'jp_mini_featured_do_page' );
    }
  5. Liltiger
    Member
    Posted 6 months ago #

    Ok nevermind. The above code works for the mobile, but for some reason it breaks the page on a pc browser. Sorry, but my php skills are n00b.

  6. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 6 months ago #

    It would probably be easier to just install the old version of the plugin (1.4). You can download it here:
    http://wordpress.org/plugins/jetpack-mobile-theme-featured-images/developers/

    Once you've done so, you'll want to disable Jetpack's Featured Images or you will have 2 sets to Featured Images: one above, and one below the title. To do so, you can follow these instructions:

  7. Liltiger
    Member
    Posted 6 months ago #

    That worked like a charm! Thanks, Jeremy.

    BTW, is it possible to make it an option to choose whether the image shows up above or below the title in future updates? Or at least be able to let's say manually insert it into the loop like your sharing buttons?

    Thanks for your help again!

  8. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 6 months ago #

    is it possible to make it an option to choose whether the image shows up above or below the title in future updates?

    I'll consider the idea!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.