• Hello,

    It’s possible to use a featured image via custom fields on this theme?

    Which code should be modified and which files?

    My site has 12,000 posts and I can’t add a featured image manually to every single post.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Access Keys

    (@access-keys)

    Hi Geetar,

    SportsMag is a child theme of AccessPress Mag so there was some limitations.

    Regarding featured image you can edit home-page.php file for homepage. This is not sufficient for whole sites. So you must edit code at archive and single pages too.

    Thanks,

    Thread Starter Geetar

    (@geetar)

    Hi Access Keys,

    Thanks for your prompt reply!

    Do you know which code must be changed assuming that the custom field is “thumbnail”?

    Thanks in advance

    Theme Author Access Keys

    (@access-keys)

    Hello Geetar,

    First you should get the thumbnail value from your custom field like $thumbnail_path = get_post_meta($post_id, $key, $single);
    , then replace $sportsmag_image_size[0] by $thumbnail_path.

    Like this you should change all image path.

    Thanks,

    Thread Starter Geetar

    (@geetar)

    Hi Access Keys,

    Thank you so much for your reply.

    I’ll try your code.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image via custom field’ is closed to new replies.