Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

Working With Postformats


  #1  
Old Feb 18, 2016, 04:04 PM
flyboy's Avatar
flyboy
 
115 posts · Sep 2010
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)


Last edited by flyboy; Feb 18, 2016 at 08:27 PM.
  #2  
Old Feb 18, 2016, 06:52 PM
CrouchingBruin's Avatar
CrouchingBruin
 
299 posts · Aug 2010
Santa Monica, CA
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.
__________________
My Montezuma-themed sites: ESHS Girls Basketball Team, Venice Hongwanji Buddhist Temple
Please consider making a donation to BytesForAll for their great themes!
  #3  
Old Feb 18, 2016, 07:54 PM
flyboy's Avatar
flyboy
 
115 posts · Sep 2010
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


Last edited by flyboy; Feb 18, 2016 at 08:24 PM.
  #4  
Old Feb 18, 2016, 08:00 PM
CrouchingBruin's Avatar
CrouchingBruin
 
299 posts · Aug 2010
Santa Monica, CA
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.
__________________
My Montezuma-themed sites: ESHS Girls Basketball Team, Venice Hongwanji Buddhist Temple
Please consider making a donation to BytesForAll for their great themes!
  #5  
Old Feb 18, 2016, 08:22 PM
flyboy's Avatar
flyboy
 
115 posts · Sep 2010
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):


Last edited by flyboy; Feb 18, 2016 at 08:27 PM.
  #6  
Old Feb 19, 2016, 08:33 AM
juggledad's Avatar
juggledad
 
23,576 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Wordpress doesn't allow new formats (see http://codex.wordpress.org/Post_Formats)
Quote:
The Post Formats feature provides a standardized list of formats that are available to all themes that support the feature. Themes are not required to support every format on the list. New formats cannot be introduced by themes or even plugins. The standardization of this list provides both compatibility between numerous themes and an avenue for external blogging tools to access this feature in a consistent fashion.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Feb 19, 2016, 11:10 AM
flyboy's Avatar
flyboy
 
115 posts · Sep 2010
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)


Last edited by flyboy; Feb 19, 2016 at 11:12 AM.
  #8  
Old Feb 19, 2016, 11:25 AM
CrouchingBruin's Avatar
CrouchingBruin
 
299 posts · Aug 2010
Santa Monica, CA
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' ); ?>
You call this:
Code:
<?php bfa_loop( 'myformat' ); ?>
Now Wordpress will look for myformat-video.php instead of postformat-video.php if the post format of the post is Video. You will probably need to create a myformat.php as the default post format template (I don't know if it will go back to the postformat.php subtemplate if myformat.php isn't found).
__________________
My Montezuma-themed sites: ESHS Girls Basketball Team, Venice Hongwanji Buddhist Temple
Please consider making a donation to BytesForAll for their great themes!
  #9  
Old Feb 19, 2016, 12:03 PM
flyboy's Avatar
flyboy
 
115 posts · Sep 2010
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?

.

Last edited by flyboy; Feb 19, 2016 at 12:35 PM.
  #10  
Old Feb 19, 2016, 06:01 PM
juggledad's Avatar
juggledad
 
23,576 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #11  
Old Feb 19, 2016, 06:50 PM
flyboy's Avatar
flyboy
 
115 posts · Sep 2010
Quote:
Originally Posted by juggledad
You could also have other 'aside' and 'audio' posts - which do not have the category 'podcast' - and they would be displayed a different way on their category page.
Thank you JD.

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?
  #12  
Old Feb 19, 2016, 07:27 PM
juggledad's Avatar
juggledad
 
23,576 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #13  
Old Feb 21, 2016, 07:44 PM
CrouchingBruin's Avatar
CrouchingBruin
 
299 posts · Aug 2010
Santa Monica, CA
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:
  • postformat-image: displays a full-size featured post at the top, followed by the post excerpt.
  • postformat-gallery: subtemplate for my posts which display a gallery. The subtemplate displays the post excerpt and at the bottom is a full size featured image.
  • post-format-video: displays the entire post content using a call to the_content instead of the_excerpt. I wanted the embedded video to show up on the home page, which is why I decided to display the entire post content for those posts.

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.
__________________
My Montezuma-themed sites: ESHS Girls Basketball Team, Venice Hongwanji Buddhist Temple
Please consider making a donation to BytesForAll for their great themes!

Bookmarks

Tags
custom postformat, postformat

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] page align not working IE, but working in other browsers + headers not rotat mafgirl Atahualpa 3 Wordpress theme 12 Sep 21, 2010 12:38 PM
Following widget not working properly, followers working marced Sidebars & Widgets 0 Apr 4, 2010 06:01 AM


All times are GMT -6. The time now is 12:48 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.