Site logo

Archived topic

all in one seo search results video posts don't show thumbnail

15 replies · Started by Nikos on April 4, 2021

Viewing posts 1–15 of 16

hi, i installed all in one seo and i lost the post thumbnails of the videos in any related search.
strange thing, on the archive pages (categories tags etc) everything is working fine.
is there a solution the search results to be fixed also?
thank you !!

Hi Nikos,

Can you let me know what to search to see the issue?

Have you checked with the plugin's support team and see why their plugin would do that?

hi leo !! go to search icon up left, put in the search box "video" and you will see the video posts (among others) do not have anymore the thumbnail.
on the other hand, when you go to the menu box, up right, and you click on the video category you will see all videos have a thumbnail.
it happens only with generatepress and with aioseo. with yoast and generatepress i don't have this problem.
in the past dave and tom have helped me to solve a similar problem
https://generatepress.com/forums/topic/video-post-type-blog-results/
thank you

Hi there,

if the issue arises when All In One SEO is enabled then first you want to check if another plugin is conflicting with it - by temporarily disabling other plugins. If the issue persists then you will need to speak with All In One SEO support to find out what changes they are making to search results.

hi dave,
yes i will do that. the only problem is that this is happening with the generatepress theme. but let me replicate it in other test sites also because maybe there is a triple combination (gp, ivory search, aioseo) or even quatreto (gp, ivory search, aioseo and elementor).
as long as i was with yoast i didn't have this problem. i will come back here if i find something more specific.
thank you

hi again,
aioseo was not the problem. i made a staging site, i removed aioseo, i put back the yoast seo but again the same problem. let's say 2 weeks ago, everything was working fine, so maybe there were updates i didn't notice.
then i made a test site just with generatepress.
again there, in the normal "blog" page, the video post shows the thumbnail.
but when i use the search (standard search that comes with the generatepress theme) i get no video thumbnail at the result.
what is the difference between the search page and the blog page?
i thought they all come from the same .... parent page :)
can i individually edit the appearance of the search page? in the customizer layouts i find only archives (that i suppose search belongs there also, together with the categories/tags?)
thank you

hi david, i spent 2 days creating test sites and try everything :) :)
yes, with the php code, it works.
but if you look at the forum link i provided above, tom said, it is working also without the php code.
"That way you don’t need any PHP snippets. Set the Video post format, then add the More tag after the video in your content.", i quote His words :)
and yes it was working just fine till 2-3 weeks ago (i don't remember exactly when i lost that function). accidentally it happened exactly when i converted from yoast to aioseo that confused me.
but i made 2 new sites and only at generatepress i lose that function.
check the links i provide down please.
so my main question is, did something changed in generatepress theme? if not, it would be very strange :)
thank you all for your efforts!!

the only problem with the php is that it shows everything in the rest of the posts and of course i don't like that :) :)
take a look in the link beneath.
thanks

GeneratePress doesn't have the built-in ability to only extract the video from your video posts and not display the rest of the content.

This is where you'd want to use the More Tag (https://docs.generatepress.com/article/using-the-more-tag/), as you can choose exactly where the "excerpt" cuts off (after the video).

That way you don’t need any PHP snippets. Set the Video post format, then add the More tag after the video in your content.

This is true, except when we're talking about search results. Search results always show the excerpt by default, regardless of the post format. So, the function is required here.

hi tom!!
but it was working before also in the search results :)
i am so sad i don't have a screenshot to show you.
last weekend i had it on my staging site, working perfectly and trying to find the differences with my live site and correct it i destroyed it there also :)
that is why i thought something changed :)
but if you say nothing changed in the core of gp (pro) then i have to use the "more" for every post unfortunately so it will not show the full excerpt in the search results and destroy everything :)
thank you !!!

I had to dig into the code to make sure, and the code says that search results will always display an excerpt regardless of post format. That definitely hasn't changed, so it's really weird that it was working for you. Perhaps there was a function active before that's no longer there?

hi tom,
yes something there was for sure :) the good thing is that i have all my phps/css because of your good tip to use the code snippets. so with it i can enable/disable some and experiment around.
but i did an experiment and it worked. i read somewhere in the forums here (i think it was an old ticket)
to insert the youtube embeded in the excerpt field. i did and .... magically worked !!!!
does it help you? i created a staging site to check if you can find something.
because it is a new site with only few video posts, i don't mind to change them and put in the video excerpt the youtube embededs (i am not sure about the plural here).
i worry only for the future if one day changes happen and this does not work either and i have to change ... 1000 video posts :)
the only negative with this procedure is that i have to double insert the video, 1. normal youtube block with address paste inside and then 2. copy video code from youtube and paste in excerpt.
thank you very much !!

If it was me, I would add the video HTML to a custom field. This way you will always be able to access the video HTML in the future, regardless of what changes. No need to worry at all.

Once you do that, you can output it in your posts like this:

add_action( 'generate_before_content', function() {
    $video = get_post_meta( get_the_ID(), 'your_custom_field_name', true );

    if ( $video ) {
        echo $video;
    }
} );

Using the excerpt field is a similar method, but it has the potential to break one day if WordPress changes it for some reason.

hmmm :) you put new words and terms to my vocabulary :)
i have to read about custom fields and understand what they do :)
i will try to do what you said and come back to you to inform you for my progress :)
thank you !!

This archived topic is closed to new replies.