Community Forums › Forums › Archived Forums › General Discussion › No Need for Featured Image in Pro Themes?
- This topic has 30 replies, 5 voices, and was last updated 10 years, 11 months ago by Brad Dalton.
-
AuthorPosts
-
October 21, 2013 at 2:55 am #67972Gary JonesMember
Now, the only thing more perfect would be a checkbox under Theme Settings that says “Turn off fallback image behavior”
That's not necessarily something that 80% of people are going to use, but it is plugin territory....go ahead 🙂
(With the proviso that a plugin which only makes one binary (on or off) change, doesn't need a UI - the user can just activate or deactivate the plugin to do the same, which then pretty much brings you back to the code I already posted.)
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
October 21, 2013 at 3:00 am #67973Gary JonesMember@Mealtog - you're pretty much correct. Just because Genesis tries to be helpful, might lead to some issues should you ever switch themes away from Genesis child theme. The Featured Image feature is a WP feature, so other plugins and themes could still do something with it, so I'd recommend adding a featured image to post whether you think you'll need it now or not. It's a little bit more work, but it's common to see it visually. You could even avoid duplicating it by putting the chosen image as the first one in the entry content, and just echo a particular size of the featured image to before the single entry anyway (with code).
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
October 21, 2013 at 6:01 am #67989Brad DaltonParticipantThanks for writing the code Gary. Tested and works perfectly.
Do you mind if i republish your code on my blog?
October 21, 2013 at 6:28 am #67996Gary JonesMemberDo you mind if i republish your code on my blog?
Go ahead 🙂
Just as an aside, for general interest - the reason for the
isset()
, is that not all calls togenesis_get_image()
may have an argument array that contains a context key, since it was only added in Genesis 2.0. Without theisset()
check, I think my snippet would throw a PHP Notice for each of those calls, undefined index.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
October 21, 2013 at 6:56 am #68002Brad DaltonParticipantTested on Genesis 1.9.2 and no problems but clearly not needed in that case anyway.
October 21, 2013 at 8:25 am #68031Gary JonesMemberCorrect - on Genesis 1.9.2, it will just be setting a key that isn't used by Genesis 1.9 core.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
October 21, 2013 at 11:39 am #68070SummerMemberThat’s not necessarily something that 80% of people are going to use, but it is plugin territory….go ahead 🙂
Haha! A reason to try my hand at making a plugin! 🙂
Gary, this is a wonderful help... it's not something I'd use on all my sites, but one several of them, this ability in Genesis 2.0 to turn that off is a welcome addition, something I've been waiting for literally for years. It'll be essential on those sites, for me, and I can't thank you enough!
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkOctober 21, 2013 at 12:29 pm #68074Gary JonesMember@atouchofsummer - feel free to link me to your plugin code (especially if it's on GitHub) if you want me to take a look and potentially offer feedback. Others may also appreciate the plugin.
@braddalton - please let me know when your tutorial is live 🙂
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
October 21, 2013 at 2:09 pm #68087MealtogMemberThanks @Gary Jones. It's good to know that my move forward to to include a Featured Image is a good one.
October 22, 2013 at 9:15 pm #68321SummerMemberHoly Cow. I just wrote a plugin and on my test site it works.
Yes, I just surprised myself 🙂
And yes Gary, I will take you up on your offer after I clean it up a little bit more!
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkOctober 23, 2013 at 6:11 am #68397Brad DaltonParticipant -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.