May 4, 2011

Add featured thumbnail automatically to excerpt | CyberSEO Pro | Support Forum

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Add featured thumbnail automatically to excerpt
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
October 8, 2012
7:03 pm
Avatar
ryan4021
Guest
Guests

Hello,

I would like to be able to add the featured thumbnail of the post to the $post['post_content'] upon creation of the blog automatically, basically takes portion of post_content turns into excerpt and add featured thumbnail to left of it so it's inside the_excerpt. Is this do-able with filters or through the php addon section in your plugin?

Thanks

October 9, 2012
7:21 am
Avatar
CyberSEO
Admin
Forum Posts: 3949
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

The featured image (post thumbnail) is a sort of attachment. Thus it is attached to a whole post record, but not to it content or description. The way the featured image gets displayed is fully defined by the WordPress theme.

October 9, 2012
2:42 pm
Avatar
ryan4021
Guest
Guests

Hello,

Yes we would actually just go about using the get_post_thumbnail and utilize it with our custom image sizes we have setup inside the wordpress theme.

One issue for us is though is when we make a post, it goes off to a number of web 2.0 properties based on the_excerpt. It simply uses regex to find the image tag and plugs it into the data to pushed to web 2.0 properties. With our get_post_thumbnail physically inside the template it doesn't recognize it in the_content or the_excerpt.

So we were wanting to setup a filter OR be able to customize the post_excerpt upon creation of the post itself within the PHP addon section in CyberSEO.

Is this do-able? 

Thanks

October 10, 2012
8:19 am
Avatar
CyberSEO
Admin
Forum Posts: 3949
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

I don't think it's possible to do with CyberSEO, because your code in "PHP code <?php .. ?>" executes before the new post gets created. That means the code can't know which exactly ID the assigned by WP to a newly created post.

Thus you need a simple code (as a plugin, or built right into your theme) which will automatically insert the appropriate post thumbnail into the excerpt of every post (see the_excerpt() and the_excerpt_rss() filter descriptions).

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 541

Currently Online:
24 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 84

s.baryshev.aoasp: 68

Freedom: 61

Pandermos: 54

MediFormatica: 49

B8europe: 48

Member Stats:

Guest Posters: 337

Members: 2855

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1642

Posts: 8357

Newest Members:

samuel2288, comercios.cercademi, wanmarkets, torontomark48, info.ckmedianetwork, contact.mybeautystar

Administrators: CyberSEO: 3949