Forum Replies Created
-
AuthorPosts
-
jdaviescoatesMember
Thanks Brad,
Do you know of any reason why I should perhaps not use this code?:
//* Code to Display Featured Image (and therefore featured video embed) add_action( 'genesis_before_entry_content', 'featured_post_image', 8 ); function featured_post_image() { if ( is_singular( 'archive' ) ) return; the_post_thumbnail('post-image'); }
So far it is both the least amount of code and results in the best outcome for my purposes 🙂
jdaviescoatesMemberBrad,
Your code added the featured image to archive pages (when featured image option checkbox was selected in Genesis -> Theme Settings), but not on single posts, and even in the archives it was too small.
For now I've just gone back to using this code:
//* Code to Display Featured Image (and therefore featured video embed) on archive posts add_action( 'genesis_before_entry_content', 'featured_post_image', 8 ); function featured_post_image() { if ( is_singular( 'archive' ) ) return; the_post_thumbnail('post-image'); }
Which seems to do the trick (apart from on the homepage), but I then hack to uncheck the "Include Featured Image?" option in Genesis -> Theme Options or I end up with two featured images.
jdaviescoatesMemberBrad,
re:
This question relates to a 3rd party plugin which no longer seems to work. I suggest you look for another plugin which does work.
The plugin works really well, it just doesn't play well with Genesis child themes (although it has previously worked fine with them too).
But many thanks for your code suggestion, I give that a whirl too to see what results it produces...
jdaviescoatesMemberRe-trying long post without links:
Heh, it seems I had this problem before:
I've now got it pretty much working as intended.
I'd previously added this to get featured images to display on single post and pages:
//* Add featured images after title on single posts and pages add_action( 'genesis_entry_header', 'single_post_featured_image', 15 ); function single_post_featured_image() { if ( ! is_singular() ) return; $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) ); printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img ); }
I've now removed that and replaced it with this:
/* Code to Display Featured Image (and therefore featured video embed) on archive posts add_action( 'genesis_before_entry_content', 'featured_post_image', 8 ); function featured_post_image() { if ( is_singular( 'archive' ) ) return; the_post_thumbnail('post-image'); }
And have unchecked "Include the Featured Image?" in Genesis -> Theme Options
Now I've got the featured video being displayed instead of the featured image on single posts:
[link removed in hope comment will post]And in archives:
[link removed in hope comment will post]But not on the homepage:
[link removed in hope comment will post]Be great to get it working there too...
jdaviescoatesMemberGah, I've just posted another long comment here (twice) and I'm not getting any moderation warnings, but it isn't appearing and when I tried to re-post it after writing it the second time it said I'd already said that...
jdaviescoatesMemberHeh, it seems I had this problem before:
I've not got it pretty much working as intended.
I'd previously added this to get featured images to display on single post and pages:
//* Add featured images after title on single posts and pages add_action( 'genesis_entry_header', 'single_post_featured_image', 15 ); function single_post_featured_image() { if ( ! is_singular() ) return; $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) ); printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img ); }
I've now removed that and replaced it with this:
/* Code to Display Featured Image (and therefore featured video embed) on archive posts add_action( 'genesis_before_entry_content', 'featured_post_image', 8 ); function featured_post_image() { if ( is_singular( 'archive' ) ) return; the_post_thumbnail('post-image'); }
And have unchecked "Include the Featured Image?" in Genesis -> Theme Options
Now I've got the featured video being displayed instead of the featured image on single posts:
And in archives:
http://open.coop/category/open/But not on the homepage:
Be great to get it working there too...
jdaviescoatesMemberHeh, looks like I had this exact problem before:
So I've almost got it working how I want it now...
I added:
//* Code to Display Featured Image (and therefore featured video embed) on archive posts add_action( 'genesis_before_entry_content', 'featured_post_image', 8 ); function featured_post_image() { if ( is_singular( 'archive' ) ) return; the_post_thumbnail('post-image'); }
and removed:
//* Add featured images after title on single posts and pages add_action( 'genesis_entry_header', 'single_post_featured_image', 15 ); function single_post_featured_image() { if ( ! is_singular() ) return; $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) ); printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img ); }
and unchecked "Include the Featured Image?" in Genesis -> Theme Settings...
And now I think I've got it pretty much working as intended, i.e. featured images show everywhere, but when I've added a featured video that is displayed instead....
The featured video is displayed on single posts:
And in content archives:
http://open.coop/category/open/But not (yet) on the the home page:
How to get it working there too?!?
The only thing I'd like to get working now is to get the featured
jdaviescoatesMemberSadly the great Featured Video Plus plugin doesn't play well with Genesis 🙁
See e.g. this thread:
jdaviescoatesMemberSee also this github thread:
https://github.com/ahoereth/featured-video-plus/issues/5
I tried some of the code there and it almost got me to where I wanted, but not quite :-/
jdaviescoatesMemberI see this in an on-going issue:
I even have been in contact with the Genesis Framework guys in order to try to enable automatic integration with their themes – sadly I haven’t been able to resolve it.
:
I think this is perhaps the first time I'm a bit annoyed that I'm using Genesis 🙁
Why does Genesis not implement standard WordPress Featured Image stuff so things like this just work?
jdaviescoatesMemberI also have this issue. Featured Video Plus used to work fine with Genesis + Magazine Pro, but obviously some update to either WordPress and/or Genesis has broken it (although saying that, some people had these incompatibility issues years ago see e.g. https://wordpress.org/support/topic/video-only-displaying-as-screenshot although I had it working fine long after that).
It now no longer replaces the featured image with a video, but just a thumbnail of the video.
I'd love to get it working again so that videos are actually displayed where the featured images are normally displayed.
Any ideas? I'm guessing adding some of their functions to functions.php would do the trick (as per https://wordpress.org/support/topic/video-only-displaying-as-screenshot#post-3606396 but I'm not exactly sure how best to do that).
At present I have this code in my functions.php
//* Add featured images after title on single posts and pages add_action( 'genesis_entry_header', 'single_post_featured_image', 15 ); function single_post_featured_image() { if ( ! is_singular() ) return; $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) ); printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img ); }
I guess somehow I need to add something like (as per https://wordpress.org/support/topic/video-only-displaying-as-screenshot#post-3606396 ):
if ( has_post_video() ) { the_post_video(); } elseif ( has_post_thumbnail() ) { echo post_thumbnail; }
Could someone help me do that?
jdaviescoatesMemberDoh - this is simply configurable in Genesis -> Theme Settings
jdaviescoatesMemberAh, you change the color in the color section of customize! 🙂
jdaviescoatesMemberHeh, turns out all I had to do was:
Display post content
Content limit: 0Then it works like I wanted it to!
jdaviescoatesMemberHeh, turns out all I had to do was:
Display post content
Content limit: 0Then it works like I wanted it to!
jdaviescoatesMemberHeh, turns out all I had to do was:
Display post content
Content limit: 0Then it works like I wanted it to!
jdaviescoatesMemberMarcy, I love you!
I knew it must be possible!
Thanks!
jdaviescoatesMemberIt is the same.
With Display post excerpts selected in Genesis -> Theme Setting -> Content Archives the post breaks where I choose (i.e. where I put the More Tag) but no read more link is displayed.
With Display post content selected the read more link is shown (changed by your code to read Continue Reading instead of the default Read more), but it is displayed at the content limit, not where I put the More Tag in the post.
jdaviescoatesMemberInstead of the excerpt Genesis makes after the usual 50 words, I’d like to be the judge of what is visible on my home page.
Me too!
It seems that in Genesis (generally, but specifically in my case using the Sixty Nine child theme) you can only choose from 2 sub-optimal options:
1. in Genesis Theme Settings -> Content Archives choose Display Post Content and choose some arbitrary content limit. A …[Read More...] link is displayed. Great! But sub-optimal because you can’t use the More Tag within posts to choose exactly where you want that link to appear.
2. in Genesis Theme Settings -> Content Archives choose Display Post Excerpt. This respects the More Tag in posts and cuts off posts there. Great! But no …[Read More...] link is displayed and so this option is also sub-optimal.
Is there really no way to be able to choose exactly where you want the …[Read More...] link to be displayed in Genesis?!?
All I want is to be able to insert the More Tag in a post and for the blog page and content archives to display a …[Read More...] link at that point. This must be possible, no?
It seem I can either I can have a …[Read More...] link displayed after a given number of characters (by choosing Display Post Content and setting the character limit), or I can choose where I want the break to be post by post (by choose Display Post Excerpt) but then no …[Read More...] link link is displayed at all.
I simply want to be able to choose on a post by post basis where to break posts and have a …[Read More...] link displayed. Please help!
jdaviescoatesMemberThanks for trying to help Genwrock, but that doesn't make any difference.
All your code does is change the default …[Read More...] link into a button and change the words to Continue Reading.
My points 1 & 2 here still hold true; that is either I can have a …[Read More...] link displayed after a given number of characters (by choosing Display Post Content and setting the character limit), or I can choose where I want the break to be post by post (by choose Display Post Excerpt) but then no …[Read More...] link link is displayed at all.
I want to be able to choose where to break posts and have a …[Read More...] link displayed.
-
AuthorPosts