travelndiveblog
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Emphaino] Functions.php in child themeYou’re right, I did miss the <?php …. ?> tags. Thanks for that!
After solving that issue, I tried adding five extra image sizes to my theme by entering (for example):
add_image_size(‘450-wide’, 450, 0, false);
(etc. for each size)That didn’t work. Then I changed the code to:
add_image_size(‘450-wide’, 450, 9999, false);
(following the half-width and full-width sizes by defining the maximum image height as 9999 instead of 0)
That didn’t work either. So I tried:
add_image_size(‘450-wide’, 450, 9999);
Same result for all three: in Edit Post > Add Media, the names of the new image sizes are coming up, but the sizes themselves have been shrunk. It seems that somewhere else, the maximum image width has been defined as 660px and this is overriding the php. See this screen shot to see what I mean.
Forum: Themes and Templates
In reply to: [Emphaino] Inconsistent appearance using EmphainoOh, 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!
Forum: Themes and Templates
In reply to: [Emphaino] Inconsistent appearance using EmphainoFirst 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!