Disable featured Image in the top of the post.

Best WordPress theme for game news websites, game portals or whatever your preferred subject.
GK User
Wed Feb 06, 2013 4:17 am
Is it possible to disable the featured image so it is not displayed in the top of post?

If so what file do I edit?

I would like to only disable this feature for custom post-types atm.
User avatar
Junior Boarder

GK User
Wed Feb 06, 2013 8:11 am
Hi,

Yes it is usually possible, but I need important information: do you want to disable this feature for custom post TYPES (your own type and taxonomy) or FORMATS(aside, gallery, chat, video, audio etc.) ?
User avatar
Administrator

GK User
Fri Feb 08, 2013 3:25 pm
Yes I would like to take away the featured image from any custom post type of my liking. I am talking about the image inside of the post (single). Instead of automatically forcing the featured image I would like to be able to use my own image slider or regular images.
User avatar
Junior Boarder

GK User
Sat Feb 09, 2013 11:27 am
If you want to use regular images in this place, what is a difference if you will use the featured image or not (using the regular image in the same place)? This is the same functionality.

Placing of the image slider will be hard, because it will need deeper changes in the theme structure.

In general please open the content.* file responsible for the specific post type and find fragment:

Code: Select all
<?php include('layouts/content.post.featured.php'); ?>


you can remove this line or place in some condition using conditional tags: http://codex.wordpress.org/Conditional_Tags
User avatar
Administrator

GK User
Mon Feb 11, 2013 6:03 pm
dziudek I have explained my self wrong here.

What I want to do is simply take away the image that automatically gets posted in the top of "single-my-own-custom-post-type.php" if I add a featured image to that petacular post. So If I want images/sliders in that post I'll have to add that manually.

But I still want to keep that feature in the normal posts (single.php)

Does this make sense to you?
User avatar
Junior Boarder

GK User
Mon Feb 11, 2013 7:58 pm
So in this case you have to edit only content-*.php files connected with your custom post types i.e. for the "speaker" post type it will be content-speaker.php
User avatar
Administrator

GK User
Mon Feb 11, 2013 9:07 pm
So what i've done now is created a file called content-games.php and copied over the code from content-single.php.

I have also deleted:

Code: Select all
<?php include('layouts/content.post.featured.php'); ?>


from content-games.php (games in my custom post type)

But the featured image is still displayed with in the content of this post type.
User avatar
Junior Boarder

GK User
Mon Feb 11, 2013 9:54 pm
Mill3n wrote:(games is my custom post type)
User avatar
Junior Boarder

GK User
Tue Feb 12, 2013 9:36 am
Please send me the PM message with the FTP and admin access to your website and link to the page where the featured image should disappear.
User avatar
Administrator

GK User
Tue Feb 12, 2013 11:17 am
It's on my local host.

Here is an image to simply explain:

Image
User avatar
Junior Boarder

GK User
Tue Feb 12, 2013 5:38 pm
How did you registered your custom post type?

I.e. for Fest template the code for custom post type is following:

Code: Select all
register_post_type( 'gavern_speakers',
      array(
         'labels' => array(
            'name' => __( 'Speakers', GKTPLNAME ),
            'singular_name' => __( 'Speaker', GKTPLNAME )
         ),
         'taxonomies' => array('category'),
         'menu_position' => 5,
         'public' => true,
         'rewrite' => array('slug' => 'speaker'),
         'has_archive' => true,
         'supports' => array('title', 'editor', 'thumbnail', 'custom-fields', 'comments')
      )
   );
User avatar
Administrator

GK User
Tue Feb 12, 2013 11:28 pm
I used a plugin called custompress by wpmudev to register my custom post types.

You know what I would just be happy to disable that image in all content and add it manually. I cant bother with doing it just for the custom post types.

How can I delete it all together?
User avatar
Junior Boarder

GK User
Wed Feb 13, 2013 8:29 am
The last way you can use in this case is place the content of the content.post.header.php in the followin condition:

Code: Select all
if ( 'YOUR_TYPE' == get_post_type() ) {


where YOUR_TYPE is a name of your custom post type i.e.

Code: Select all
if ( 'book' == get_post_type() ) {
User avatar
Administrator

GK User
Wed Feb 13, 2013 9:32 am
To make this simple now.

What do I have to do to just take away the featured image in the top inside posts?

When I delete:

Code: Select all
<?php include('layouts/content.post.featured.php'); ?>


from content.php, both featured image with in the post and category disappears.

when I delete:

Code: Select all
<?php include('layouts/content.post.featured.php'); ?>


from content-single.php both featured images are still in place.
User avatar
Junior Boarder

GK User
Wed Feb 13, 2013 4:01 pm
Please apply the change mentioned in my previous post - the changes in the content.php and content-single.php files won't help in this case.
User avatar
Administrator


cron