• Resolved travelndiveblog

    (@travelndiveblog)


    I’m having two issues with Emphaino on my site, Travel n Dive Blog:

    1) Duplicate featured images. If I only insert an image at the top of a post, there’s no thumbnail next to the post excerpt on my home page. If I only insert a featured image, the image has no caption, and I have no control over the image size. If I insert both, I get duplicate images, which looks terrible.

    This didn’t happen to me when I started my blog a couple months ago. Not sure when exactly it changed, but it seems recent.

    It actually seems that the duplicate featured image from my post titled “A beautiful Bali sunset…” has disappeared. I’m not sure when or how because before this afternoon, I’d been away from WordPress for a couple months. But the newest post definitely still has them!

    2) Thumbnails on my home page are not all the same size. I’m not sure what’s happening here. I edited the functions.php a couple months ago because I wanted thumbnails bigger than 150px, but then updated the theme. I realise this means my edit was lost because I don’t know how to write the code for a php child theme to replace a function in the main theme.

    A post from before the theme update seems to have retained the larger size, but the one I just put up today (backdated to 25th June) is small, which is what is confusing me. Surely once the theme is updated, the thumbnail for the older post should also go smaller again, right?

    In any case, what I’d like to achieve is larger thumbnails on the home page without having to re-edit functions.php every time the theme is updated.

    I’d really appreciate some help fixing these two problems! Thanks for your time 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Srini G

    (@srinig)

    Both these are not issues with the theme. It’s just the way WordPress works and the way this particular theme is intended to work. Different people use the theme in different ways and you just have to find out how to bend the theme to make it work as you want.

    1. You should probably uncheck the ‘Featured Image in Full Post Displays’ option (under ‘Content’ in theme customizer). Also if you have chosen the post format ‘Image’ for your post, try changing it to ‘Standard’. Alternatively, don’t use featured image for ‘Image’ post formats.

    2. If you directly edit the theme file, your edits will get overwritten whenever you update the theme, it’s just the way it is. You should create a child theme for your customizations. You’ll find these resources helpful:
    http://codex.wordpress.org/Child_Themes
    http://wordpress.org/plugins/regenerate-thumbnails/

    Thread Starter travelndiveblog

    (@travelndiveblog)

    First of all, thanks for your quick reply. You’ve helped me out a lot there.

    1) “You should probably uncheck the ‘Featured Image in Full Post Displays’ option (under ‘Content’ in theme customizer).”

    Had no idea what this did before, but unchecking it has removed the duplicate images.

    “Also if you have chosen the post format ‘Image’ for your post, try changing it to ‘Standard’.”

    I hadn’t noticed, and had no idea how it happened, but this comment prompted me to notice that one of my posts was set as ‘Standard’ and one as ‘Image’. By playing around with these settings, it now seems that if I set my posts to ‘Standard’, the home page thumbnail will be small, whereas if I set the post format to ‘Image’, I get a much bigger image on the home page.

    2) I’m new to WordPress, but have managed to teach myself some CSS. I have created a child theme for style.css and I’m slowly managing to get my page looking more like how I want.

    But PHP seems more complicated to me, because if I create a functions.php file in my child theme, what I enter there won’t automatically replace the code in the parent theme, unlike for style.css. So what I need to find out is how to get around that.

    Thanks for your help!

    Theme Author Srini G

    (@srinig)

    You simply have to copy the function under which the thumbnail sizes are defined in the parent theme (taking for granted the function is made pluggable in the parent theme (in case of emphaino, it is)), paste into your child theme’s functions.php, and make the changes you want.

    Don’t worry if you don’t understand the above, simply do as I say below:

    1. Copy the function emphaino_setup() from the functions.php of the parent theme (lines 58 to 135).
    2. Paste it into the child theme’s function.php.
    3. Look for the code set_post_thumbnail_size( 150, 150, true ); in the child theme’s functions.php (pasted code) and change the values to whatever you want.
    4. Save the file and upload as applicable.
    Thread Starter travelndiveblog

    (@travelndiveblog)

    Oh, I’d read you needed some extra code to tell WordPress to replace the old code with the new (something about functions.php operating differently to style.css)

    WordPress Codex mentions something about this:
    “Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.) “

    I’d taken that to mean I’d need to write extra code in the child theme to actually replace PHP functions from the parent.

    Thanks again for all your help!

    Hi SriniG,

    Thanks a lot. Your reply also helped to me.
    Nice theme.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Inconsistent appearance using Emphaino’ is closed to new replies.