Adding Featured Image support to tml_page?
-
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 myfunctions.phpfile). 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 thesupportsproperty ofregister_post_type('tml_page')in theinit()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?
The topic ‘Adding Featured Image support to tml_page?’ is closed to new replies.