Home › Forums › Weaver Xtreme Theme › custom post type help
- This topic has 9 replies, 4 voices, and was last updated 8 years, 5 months ago by
dustbin1_uk.
-
AuthorPosts
-
April 5, 2015 at 21:06 UTC - Views: 1 #17565
dustbin1_uk
ParticipantHello all,
1) I want to stop the weaver theme showing a featured image for a comic custom post type.2) I also wanted to find the php file that builds the posts so that I can add it to my child theme and edit it to include some functions from the comic easel plugin.Thank You,MarkApril 5, 2015 at 21:42 UTC #21081scrambler
Moderatoryou need to give us a lot more details here and a link to the site.
1) If you don’t want a featured image on some posts, don’t add one when you create the post.
if you want the featured image on the single post page but not on the blog page, we need to know if you have the “plus” plugin, and have a link to the page in question so we can help with the custom CSS that can do the job
2) The single post page, or the Blog page. There is a template for single post and one for page with posts
April 5, 2015 at 23:31 UTC - Views: 1 #21082Weaver
KeymasterWeaver’s handling of displaying posts is significantly more advanced than other themes. There is no single file that “builds the posts”.
The core files that display posts are single.php, index.php, paget-posts.php, search.php, tag.php, and other archive-like pages.
The display of different post types is handled by several template files contained in the /templates directory, each prefixed with content-xxx.php. Each kind of post format is handled by a separate file, as are regular pages and the single page post view.
Using these properly requires a very good understanding of WordPress architecture and PHP. These are all very powerful and flexible designs, but as I said, there is no simple answer.
April 6, 2015 at 20:41 UTC - Views: 2 #21083dustbin1_uk
ParticipantI need to set the featured image while editing comic posts, as that tells Comic Easel what image to display as a comic.So simply not setting the featured image is not really an option.Ok, let me give you a link and you’ll see what I mean:
So I am using the Comic Easel plugin, that allows for comic posts types, a custom type enabled by the plugin.See the comic at the top? ok, now that was added by me editing the header.php in a child theme.Ok, so in that link I sent you above, if you scroll down and you will see that there is a featured image showing. That I would like to hide.Also, there is a function I wanted to slip into the creation of this page. The function in question comes with the Comic Easel plugin and would simply output some extra information such as characters featured in the comic and chapter information. It could easily go where the featured image (the bottom one) is now.I know PHP fairly well and am getting used to editing wordpress code, just need some pointers in the right directionApril 6, 2015 at 22:18 UTC - Views: 5 #21084scrambler
ModeratorThe page you linked to appears to be a single post page for the comic post type.
If by featured image you mean the comic strip that is between the post title “Digger and Snuff: EAster” and The Line of social icons, this does not appear to be an actual featured image buy an image inserted in the actual post content.
There is actually no content in the post except the image, So are you saying you want to hide all images in single post pages of the comic post type?
If so, you could add the rule below in Main options > Fonts & Custom > Custom CSS Rule box
.single-comic .type-comic .entry-content img {display:none;}
By the way, with the “Plus” plugin, you have a lot of HTML insertion areas that can be used on a page by page basis using page custom fields and that would make the child theme unnecessary to insert that comic strip below the menu.
“Plus” Also has and Action and Filter box (in Advanced Options > HEad Section) that allows you to add php actions and filters.
I don’t know if the function you want to add in that page could be done this way, but I thought I would mention it.
Or else, if you need a function on that page it would probably be in a modified version of the template in your child theme but this is not really my expertise area, may be @weaver can help more if you give more information about what the function is supposed to be doing
April 6, 2015 at 22:25 UTC #21085Maureen
ParticipantFor the Featured Image, in Main Options/Post Specifics, scroll down to Featured Image – Posts. There you have the option to hide your FI on Full Posts, Excerpts and Single Post Pages.
April 6, 2015 at 22:52 UTC #21086scrambler
ModeratorThanks for bringing that up Maureen it had escaped me 🙂
April 7, 2015 at 08:37 UTC #21087dustbin1_uk
ParticipantThanks for the advice so far! It’s really nice to have a theme that has such a responsive community around it.
Yes I looked at Weaver Plus, but so far I have not had a need to upgrade, as the free theme is so generously excellent.As for the settings @Maureen mentioned, thank you, but that would affect standard WordPress posts as well as Comic Post Types.I’ll try that CSS hide option @scrambler mentioned.As for the functions I wanted to add, for now I can add them under the comic in the header.php in my child theme, and will spend time on my test server to figure out a proper place to put it later.The injection of custom php functions and handling of custom post types in the theme would be nice if it was added to the R&D list?April 7, 2015 at 17:26 UTC #21088scrambler
Moderator“The injection of custom php functions and handling of custom post types in the theme would be nice “
The injection of PHP is available in “Plus” both in the Action and filter box and with a PHP shortcode, and the them handles custom post type, so not sure what you are getting at here.
Without plus, there are plenty of PHP exec plugins that allow you to inject PHP in any content area
April 10, 2015 at 19:43 UTC #21089dustbin1_uk
Participant“and the them handles custom post type, so not sure what you are getting at here”
I simply mean the ability to set options on custom post types differently to standard posts.In the same way pages can have different settings to posts.as for the injection of PHP code, if plus handles that, fair enough, will look into that.For now I a using a plugin.Plus sounds very appealing though, and I bet it won’t be long before I subscribe to it. -
AuthorPosts
- You must be logged in to reply to this topic.