Archived topic
GeneratePress: Post Formats don't work
13 replies · Started by Anonymous on February 5, 2015
Post formats are integrated (I think) correctly in the functions.php and index.php.
functions.php:
* Enable support for Post Formats
*/
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
index.php
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
The template files exist.
But every time I write for example an aside or link, the post always shows the standard template.
Any hint?
Torsten
Ok, Resolved the problem by myself. I missed to use "get_post_format()" in single.php.
Glad you figured it out :)
I don't understand this and I don't see any change in different post formats. Do I need to do something to activate them?
Weird, I'm literally working on them right now :)
Standard: Will spit out everything as usual, and will respect the "full post" or "excerpt" setting in the Customizer.
Aside: Will show your post with no title, date or author. Footer entry meta is still shown, and HTML is aloud.
Image: Will show all content, the "excerpt" setting will be ignored.
Video: Will show all content, the "excerpt" setting will be ignored.
Status: Will hide the title, date, author and footer meta - will only show your content.
Quote: Will show all content, the "excerpt" setting will be ignored.
Link: Will show all content, the title link will point to the first link in your content.
So yes, there's a few in there that do the exact same thing - that may change in the future.
All of this is as of 1.2.9.
Thanks!
Nice list. :)
Gallery that shows a slide show in the excerpt would be nice, too. I saw that on another theme recently.
Hi there Tom and team,
I would have to agree with Dee.... a Gallery option for post formats. It takes all the images you embedded into a post, and turns them into a gallery / slideshow / slider.
Since I don't see it as one of the post format options, is there any code / etc that you could share that would allow us to implement it?
Thank you!
That would definitely be cool.
Way too much code for me to try and share here, but it's something I would like to implement.
Would the post still show the gallery, or would the items from the gallery show up in a slider and then have the gallery not show?
I think having just the slider is more intuitive these days, but there could always be an option, I guess.
So if you have the gallery post format set, convert the gallery to a slider and hide the gallery?
That's what I would do.
Agreed :-)
Hi,
I need to differentiate the posts on my site between articles and recipes so that I can place the specific markups of structured data in them.
Creating a new type of post does not seem to be the best alternative because the articles are already there on the site and I do not want to change url, etc.
So I would like to know how I can copy the "standard" post format to the "aside" format.
That way I will select the post format "aside" for every recipe and the structured data plugin would know where to place the necessary schemas in the recipes.
Can you open a new topic for your question?
This one is super old.
Thanks!
