GavickPro / Meet-GavernWP

Meet GavernWP is a responsive free Wordpress theme
35 stars 23 forks source link

Option to disable the title section in the post/page #67

Closed dziudek closed 11 years ago

dziudek commented 12 years ago

The value will be stored in the post meta data.

NormanUK commented 12 years ago

Added this feature will post asap. Also shall we include switches for date/category name/author/leave a reply as well ?

dziudek commented 12 years ago

Ok, we'll include also switchers for all other article meta data. It will be a little bit like Joomla! :)

NormanUK commented 12 years ago

How about something like k2 options, switchers for category layout & item layout. Is category template the only template used for category layout or is there another?

dziudek commented 12 years ago

There are a lot of templates with this layout. It isn't an easy to make this options and we should be careful with adding a lot of options, because it must be stored in the post meta data. I'll include options to hide the title (currently the title is automatically hidden, when the title is blank) and options to hide specific parts of the post/page meta-data.

I think that we can store these params in one post meta-data as a JSON string.

NormanUK commented 12 years ago

Nearly finished, just need to add translation support and commit changes. Following is what I've done.

  1. Created class to create metabox as much as you define. No need to define add/save/update functions for each metabox.
  2. Removed metabox function for Seo Description and keyword and added them using above class.
  3. Added Post / Page switcher options for following fields; Post / Page Default: Title, Post Format, Date, Category, Author, Comment link, Edit Link Contact Page: Name, Email, Message. Other pages uses Title from post/page rest of the fields hidden with jquery. Works on new page or edit page or live change in template selection. Contact Meta box only visible in contact template, hidden in other templates. Works on new page or edit page or live change in template selection.

Pointers for further improvements

  1. Check if statements as using != did not work in my tests for already published items. So had to use empty()
  2. If you can check html outputs of fields, adjust / add class names to fields for future styling with css as currently I didn't add any.
  3. Useful to add extra field types to Metabox class for future reference. Such as image uploading, video adding etc etc.

All commits checked and working.

dziudek commented 12 years ago

@NormanUK - if you are starting implementation of some features please consult it before starting code with me, because architecture of some features should be reviewed by me. In other case if the code will be wrong structured you will only lost your time.

dziudek commented 12 years ago

@NormanUK - Please understand - I really appreciate your help - it is amazing for me and I'm happy that you're cooperating with us, but we need some standards :) I think that we should always talk a little bit before starting some things, because then we will able to select the best solutions :)

NormanUK commented 12 years ago

Time and effort is not a problem for me. All code is commented so it is easy to distinguish, you can review and use whichever part is suitable for you when I start a fresh fork and commit the changes tomorrow ;)

dziudek commented 12 years ago

@NormanUK - yes, of course - but sometimes it is worth to consult some things and implement it properly instead of review the whole code and then changing it - it is less efficient and takes more time ;) So for the future changes please always write a short message to me ;)

dziudek commented 12 years ago

Or the best solution - please create an issue with the feature which you want to implement - then we'll discuss about the details, maybe somebody else will also add his comment :)

NormanUK commented 12 years ago

Ok, will do that ;)

dziudek commented 12 years ago

Thanks Mate :) And I'll waiting for your pull request :)

rl7greg commented 12 years ago

Hi, I just had the need for this feature and I see I'm not the only one :) I searched the plugins directory, and found this plugin - but it says it works just for a certain theme: http://wordpress.org/extend/plugins/genesis-title-toggle/ Might be some ideas for implementing it in there...

ckubs commented 11 years ago

This isn't a desperatelly must have feature(since it could also complicate Gavern too much and untill now that's what I like about it compared with YOO's framework or the much much bloated and heavyer Gantry) but:

Today I was triyng to publish a status post, deleted the title to see what's all the talking here, saved the post and looked kinda broken since posts without title don't even display the date or any other place that could have a link to them. It come to my mind a simple thing I have done to an older theme with custom post formats. Edited content-status.php template and deleted the code that shows the title.

I don't know how proffesional is this sice Gavern calls layouts/content.post.header.php for every post format layout and it's not like deleting <?php the_title ... but, I'm just saying. And who wants to have a post without the title then can just select the status post format.

ckubs commented 11 years ago

If Gavern uses defaul wordpress way with post formats this is how I done it(I don't know too much about coding): <?php if ( has_post_format( 'status' ) ) : { ?> bla bla bla <?php } else : { ?> bla bla bla<?php } That kind of thing could also solve my question about disabling featured image on some pages. If the post format is image to show the featured image inside and out(search, archives ...etc), if it's not only outside the article.

dziudek commented 11 years ago

Added: https://github.com/GavickPro/Meet-GavernWP/commit/9fbb851d8ee8901704850069e52649509db8677e