• Resolved dstofka

    (@dstofka)


    I recently updated Theme My Login from 6.2.3 to 6.3.6 and, like seemingly many others, have been running into some problems migrating to the new “tml_page” Custom Page Type paradigm from the standard Pages that TML 6.2.3 used.

    One problem I just solved — for now — is that my old page templates made use of Featured Images (using add_theme_support('post-thumbnails'); in my functions.php file). Unfortunately, the “tml_page” custom page type doesn’t support Featured Images.

    After doing a little digging I made an edit to this file —

    /wp-content/plugins/theme-my-login/includes/class-theme-my-login.php

    — such that 'thumbnail' was added to the supports property of register_post_type('tml_page') in the init() function. The line now reads:

    'supports' => array( 'title', 'editor', 'page-attributes', 'thumbnail' ),

    This did the trick, but I had to modify the plugin code directly. Is there a better way to achieve the same result that won’t get overwritten by the next version of the plugin?

    http://ww.wp.xz.cn/extend/plugins/theme-my-login/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    function tml_init() {
    	add_post_type_support( 'tml_page', 'thumbnail' );
    }
    add_action( 'init', 'tml_init', 11 );

    FYI: 6.4 will be reverting to WP pages.

    Thread Starter dstofka

    (@dstofka)

    Thanks … that did the trick!

    … And it seems like I’m finally getting everything working again with your plugin.

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Don’t get too comfortable – 6.4 will be reverting TML pages to regular WP pages.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding Featured Image support to tml_page?’ is closed to new replies.