Working With Postformats
I want to create a postformat for podcast type of posts, and I am 100% clear on how to do that in Montezuma. What I don't know is how to give a user the ability to mark his/her post as a podcast postformat in the WYSIWYG interface when creating a post.
Custom postformats I created simply do not get listed anywhere in the interface, so how is Montezuma to know that a given post is of a custom postformat? (the reason this is needed is because the homepage was designed to display a single post of each custom postformat I created) |
I've looked into this before, and I don't think you can define your own post formats, you are limited to the 9 special ones, i.e., Wordpress is only going to look for the presence of one of those nine, and if it doesn't find one, it defaults to the standard postformat.php. Are you using the audio post format for anything? If not, then you can create a subtemplate called postformat-audio.php and have your users pick Audio for podcasts.
|
Based on what is documented in the theme itself (image below) I'm pretty sure that can be done.
However the documentation doesn't provide any instructions for what needs to be done to have the described custom postformats appear in the interface. The ability to create custom postformats without the handle to call them into a post would be kind of pointless, so I'm sure there is a way to do it. I'm just not having much luck in finding it |
Scroll all the way down to the bottom of that same page and read the paragraph labeled Including Post Format templates. So you can create a template called myformat-video.php, but not myformat-podcast.php, because it won't look for podcast as one of the nine special formats.
|
No cigar =(
I just created this postformat: Yet, this is still all I see in the "add a Post" interface (no new custom type of video is listed, so no way to call it in): |
Wordpress doesn't allow new formats (see http://codex.wordpress.org/Post_Formats)
Quote:
|
Thanks JD.
I must admit I am a little puzzled what the Custom Postformats feature is for in that case (specifically the stuff in the screenshot below) http://i.imgur.com/RqnfVbR.jpg |
Read the section again under Including Post Format templates. The way to get your new myformat-video.php to be used is to modify the index.php file (or whatever customized index main template you may have created) so that instead of this:
Code:
<?php bfa_loop( 'postformat' ); ?> Code:
<?php bfa_loop( 'myformat' ); ?> |
Got it, but that still leaves me with the same question - what is the purpose of custom sets of postformats (such as myotherformat, myotherformat-video, myotherformat-audio, etc) if we can simply create a set of files that are named postformat-video, postfoirmat-audio etc?
I was under the impression that naming them things other than postformat-video gives us new sets of postformats. In fact, it's in the documentation - the big question is how are those sets called into New Post interface? And if they aren't, how/what are the new sets used for? . |
I would say it is to give you options.
Lets say you create a category called 'podcasts' and you have added a post which contains the audio of the podcast. In addition, you want a aside for the podcast. You could use a basename of 'podcast' and create a podcast.ausio.php and a podcast-aside.php which would display the contents as you define them. You could also have other 'aside' and 'audio' posts - which do not have the category 'podcast' - and they woulod be displayed a different way on their category page. This is one of those - your imagination will come up with a use theat Flynn probably never thought of - things |
Quote:
One last question - how would a user set one post as podcast-audio while another as thingamajig-audio? Both being ___-audio items, there wouldn't be a way to choose one over another when posting, would it? |
I'd base it on the category since the post formats will only apply on multi post pages, but you could also create separate post main templates and the user would just choose them from the 'Virtual Template' section in teh post editor.
|
So here's an example of how I implemented two different post formats: Lady Eagles Basketball. I created the following postformat subtemplates from postformat.php:
On the home page, the first post is an Image post type, the second post is a Gallery post type, and the 4th through 10th posts are Video post types. However, I didn't want all of the images and embedded videos to show up when the user does a search. That is, by default, if you don't define a search.php main template, then index.php gets used, and the search results will look like the home page. Instead, I just wanted a plain list of posts. So I first created a search.php main template, and instead of calling postformat in bfa_loop, I call searchformat instead, and created a searchformat.php by copying postformat.php and removing the thumbnail code (plus I removed the post footer). Then I created searchformat-video.php, searchformat-gallery.php, and searchformat-image.php subtemplates, removing any thumbnail calls and, in the case of searchformat-video.php and searchformat-gallery.php, adding a Font Awesome icon before the post title that indicates either a video post or a gallery post. So if you do a search on the word varsity, for example, the search results look different that what you would see on the home page: no thumbnails/images, no full post contents, and icons indicating gallery and video posts. So the user only has to set the post format once (i.e., Video), and it can get displayed differently depending upon what type of index page it is being displayed: home page, search results, category page, etc., or some other custom index page. |
All times are GMT -6. The time now is 01:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.