Jump to content
Sign in to follow this  
Sourena

PlatformPro and Featured images

Recommended Posts

Sourena

In the previous theme I used for a website I could define Featured image for Custom post types I made (books and authors) but when I switched to PlatformPro they disappeared. I cannot define Featured images for them any more. The regular posts are fine but Custom post types do not have any Featured image. What is the reason for this issue and how can I fix it?


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
Andrew

you need to add a line of code for each post type that needs to support custom images. for example, in PlatformPro; there is a line of code `add_theme_support( 'post-thumbnails', array('post') );` if you wanted to support another post type: `add_theme_support( 'post-thumbnails', array('post', 'yourcustomposttype') );`

Share this post


Link to post
Share on other sites
Andrew

WP most likely has a hook you can use to add support..

Share this post


Link to post
Share on other sites
Sourena

What files should I add this?


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
Sourena

arpowers, Would you please let me know what file I need to edit?


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
Andrew

experiment by adding something like this to functions.php in Base: ` add_action('pagelines_hook_init', 'addposttype'); function addposttype(){ add_theme_support( 'post-thumbnails', array('yourposttype') ); } `

Share this post


Link to post
Share on other sites
Sourena

I added this to my childtheme's using "WP Post Type UI". Supposedly it should add thumbnails to the post type if you choose to have it. I added these lines to the child theme's "functions.php" file:

add_action('pagelines_hook_init', 'addposttype');
	function addposttype(){
	add_theme_support( 'post-thumbnails', array('book') );
	add_theme_support( 'post-thumbnails', array('author') );
	}

But the thumbnails still do not show up. See these links: http://kermeketab.com/authors http://kermeketab.com/books What is strange to me is that some show the featured imges inside the page like these ones: http://kermeketab.com/books/shahnameh http://kermeketab.com/authors/ezra-pound and some don't: http://kermeketab.com/authors/ernest-hemingway Interestingly thumbnails show up in the tag and category archive pages: http://kermeketab.com/topics/poetry http://kermeketab.com/category/uncategorized


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
bryan-hadaway

Hi Sourena. please hold tight for continued developer help and bump your topic. Thanks, Bryan

Share this post


Link to post
Share on other sites
Sourena

Any update on this?


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
cmunns

You may have enabled or allowed thumbnails for those custom post types e.g. books/authors but in the actual template for the post type itself did you code in the thumbnail?

Share this post


Link to post
Share on other sites
Sourena

I did not create a template for the custom post type because it seems it uses the default template for regular posts. How can I create a template for the custom post type in PlatformPro?


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
cmunns

i was assuming you did, i'm not saying you have to, but more info on how you added the custom post type would help me figure this out.

Share this post


Link to post
Share on other sites
Sourena

I created the new custom post types and their taxonomies using the plugins WP Post Type UI. You can see the interface for the custom post type "book" here. As you see Thumbnail is one of the features I have included there, and it works in the case of items who got their thumbnails before switching to PlatformPro. After switching to PlatformPro I do not have any Use as featured image when I upload an image for the Custom Post Types. If you would like to take a look at the admin I can also provide you with an ID and password. The admin for this site is in English. Screenshot-posttype-book.png


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
bryan-hadaway

Forwarding to developers. Thanks, Bryan

Share this post


Link to post
Share on other sites
Andrew

Ok, on these post types do you have the ability upload a featured image? I think I know what's going on; we may have to patch to allow for thumbnails on new post types.. (this is an operational thing with the current thumbnail handling function)

Share this post


Link to post
Share on other sites
Sourena
Ok, on these post types do you have the ability upload a featured image?
No. When I use PlatformPro, I don't. When I switch to other themes yes, I can.
I think I know what's going on; we may have to patch to allow for thumbnails on new post types.. (this is an operational thing with the current thumbnail handling function)
That is what I think the cause of this problem. Please fix that.

alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
Sourena

Any update on this? I think you need to add Custom Post Types here as well: GZnE3.jpg


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×