WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Placing Featured Image Between Title & Content

[Resolved] Placing Featured Image Between Title & Content

  • 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/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jeremy Herve
    Jetpack Mechanic

    @jeherve

    Sorry for the late reply, but thanks!

    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' );
    }

    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.

    Plugin Author Jeremy Herve
    Jetpack Mechanic

    @jeherve

    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:

    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!

    Plugin Author Jeremy Herve
    Jetpack Mechanic

    @jeherve

    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!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Placing Featured Image Between Title & Content’ is closed to new replies.