This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Default thumbnail image

  • Creator
    Topic
  • #2779
    littleantz
    Participant

    Hi Jason,

    Is there a way to assign featured image to a post. So if an editor forgot to add featured image, it has a default one rather than blank.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #2788
    Jason Bobich
    Keymaster

    You can search around for plugins. I know I’ve seen one or two on wordpress.org that do something like this.

    #2796
    littleantz
    Participant

    Hi jason,

    I was looking for something similar to this

    ======= CODE START ===========
    <?php if ( has_post_thumbnail() ) {
    the_post_thumbnail();
    } else { ?>

    <?php } ?>

    ========= CODE END =========
    to be inserted in your framework. So if there is no featured image specified it falls back to the default.

    Thanks

    • This reply was modified 7 years, 8 months ago by littleantz. Reason: code is wrongly formatted
    • This reply was modified 7 years, 8 months ago by littleantz. Reason: code tag not working properly
    • This reply was modified 7 years, 8 months ago by littleantz. Reason: change code block to pre
    • This reply was modified 7 years, 8 months ago by littleantz. Reason: can't post code so i paste it as normal text
    #2801
    littleantz
    Participant
    #2810
    Jason Bobich
    Keymaster

    If you’d like to add your own functionality for inserting the featured image, then you’d do it in the template part file that corresponds to where ever you’re trying to edit.

    http://dev.themeblvd.com/tutorial/editable-content-files/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.