Posts by georgestephanis

10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says

that would have the same limitation as menu_order: single value per post.

Not really. You could have multiple dynamically-generated meta_keys that you query against as needs dictate.

10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says

menu_order is a wp_posts field, meaning each post can only store a single value which isn’t enough in a scenario where the same post could be assinged to multiple terms with a different custom order each time. Using wp_term_relationships.term_order would be a better choice.

Eh, or just post meta, and then using meta_query to sort by that.

http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says

Now, i agree that this sort of thing should be in a plugin.

But just to let you know, that there could be plenty of reasons to put things in separate tables. Specially if you want ‘good practice’.

So … yup. Do it as a plugin, then bundle the plugin with the theme and require the user to activate it with TGM Plugin Activation so the reviews don’t completely disappear if the customer changes themes on their site.

There’s no restriction on bundled plugins using custom tables, to the best of my knowledge (not that it’s necessarily beneficial, merely permissible)—just that your theme probably shouldn’t, as that’s data that any future theme the user switches to wouldn’t be able to use.

10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says

Another question : If I strip out the functionality in my theme into separate plugins, do these plugins require to be standalone ? Do I need to strip the CSS/JS along with the plugin ?

For example: If I strip my whole Shortcode Generator as a plugin, now the tabs CSS is placed in the main stylesheet, do I need to strip that out of CSS and create a separate css in plugin and enqueue it.

I don’t think so … the point of the abstraction is so that the content doesn’t entirely go away if the user changes themes. If some styling needs to be redone, no biggie,

10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says

I don’t see the purpose of having only certain shortcodes being made into wp plugin. And like other people have said on this post. All it will do is allow other developers and users to mish-mosh .. mix and match your plugins and make a Mr Potato theme out of all your hard work. Whats gonna stop other authors or users from using your plugins in their own themes, and then you get no compensation ???

The fact that you license your bundled plugin with the same license as your theme? As such, they couldn’t use it any more easily than if they just copied the code out of your theme.

10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says

I prefer using index.php as its plug and play there’s no need to give the buyer extra instructions on assigning the front page to use a specific template. This might work for simple blog style themes but for anything more whats the point in forcing us to use a custom page template when the theme isn’t meant for simple use.

That’s what front-page.php is for. index.php is meant to be your blog page.

http://codex.wordpress.org/Template_Hierarchy#Home_Page_display
10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says

I don’t understand why “Tabs must be used for indentation—not spaces’’ is a better guideline than let’s say “Responsive design is a must have”. And guess what, everybody makes responsive themes without guidelines :) regards, Michael

Firstly, it’s standard practice for WordPress to use tabs over spaces.

http://make.wordpress.org/core/handbook/php/

Secondly, it results in smaller file sizes. One character, instead of four.

Third, consistency. One isn’t strictly better than the other (tabs v spaces)—the point is to be consistent, and TF just happened to request consistency in keeping with WordPress standards and practices.

None of the more stringent code formatting rules—just use tabs instead of spaces. It probably makes reviewer’s lives easier.

If it irritates you, indent each level four tabs instead of four spaces. That’ll teach ‘em!

10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says


As @Astoundify mentioned, perhaps Justin Tadlock’s Custom Content Portfolio plugin could work for some authors?
Perhaps for some authors, but last I checked (which has been a while), it was a very generic plugin that didn’t support the fields I use.

So use the plugin as a spine for the CPT, but add your own custom fields to it via a custom meta box.




Even though you modified the plugin you can still use your version > zip it up and utilize the TGM class. I have plugins I’ve written and I still use the activation class instead of including them directly in the theme files.
Yes, exactly! Nice work :)
Doesn’t the TGM class require the plugin be hosted on a free repository in order to be “automagically” installed? If I’m an author and I’m selling functionality on TF, I wouldn’t want it available for free. Otherwise, what am I selling?
http://tgmpluginactivation.com/#features

The plugins for TGM can be bundled with the theme. Yay googling!





Also by placing your major features in a plugin, you can really easily include those features in all of the themes you build. Update the plugin once and all of your themes have the update. So much easier to maintain.
This statement right here should at least strike something in the heads of those theme developers here that don’t think they should be using plugins. If nothing else, think of the amount of hours you will save using (even your own) plugins when developing your themes.
I’m actually surprised this wasn’t raised earlier in the discussion. It seems to make a lot of sense to me, I’d be interested to know more about you guys’ thoughts on it. Why might you think this isn’t easier / better?
Personally, I think it a wash. You can make valid arguments for and against its usefulness.

But if you just need to push a security release to the plugin component, your options are: Either update the plugin once, or deploy a theme update to all your users, and hope they’re willing to upgrade, and didn’t just happen to have an idiot developer that hacked your theme instead of using a child theme. A theme update is much simpler.




can we also add a SSL check for all external scripts/styles loaded, Ive had some cases where assets fail because of SSL.
function prefix_styles(){
//Check if is ssl
$schema = is_ssl() ? 'https://' : 'http://'; 
wp_register_style( 'cw-font', $schema . 'fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic' , array(), 1.0 , false  );    
}

Perhaps it would make more sense for these assets to be loaded without the protocol so they adopt whatever the current protocol is? Thoughts?
I believe scripts should ideally be loaded with no protocol specified ex:
//domain.tld/filename.ext
, but keep in mind that that doesn’t work on local (MAMP-based) servers where the protocol is
file://dir/dir2/filename.ext
.

If something is being generated by WordPress and served by Apache (the A in MAMP) it’s being generated and served over HTTP or HTTPS protocols. file: just views static html files.

10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says

can we also add a SSL check for all external scripts/styles loaded, Ive had some cases where assets fail because of SSL.
function prefix_styles(){
//Check if is ssl
$schema = is_ssl() ? 'https://' : 'http://'; 
wp_register_style( 'cw-font', $schema . 'fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic' , array(), 1.0 , false  );    
}

Actually, since WordPress 3.4, I believe, you can just enqueue scripts and styles as

wp_register_style( 'cw-font', '//fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic' , array(), 1.0 , false );

Leave off the http: or https: entirely—the browser is built to automatically use whichever version the current page is on.


twitter api v1.1 need curl and base64_encode, so it’s allowed? or ignore it and don’t use twitter feeds as widget

Or just use Jetpack’s Twitter Timeline widget, and let it handle all the API wrangling for you. :)


stuff

other stuff


A little something to think about … What do the buyers want?

Is every buyer a full time or part time web dev? Absolutely not, in fact from what we’ve experienced I’d be confident in saying at least 50% of our users are Tom, Dick and Harry building their website for their own local business.

They want an all in one package, and that’s why they bought a theme from Themeforest.

To an extent, perhaps, but as creators, we all have the responsibility to provide a quality product, which (in my view) necessarily entails being responsible with regard to the methods used to create said product. Don’t break things, play nice with others. Respect the decisions of the users—and embrace it. If you only support the one crappy contact form with the limited options you’re bundling with the theme, then you’re limiting your users, as opposed to supporting a couple third party offerings (which will be more reliable, more features, and happier users)


Sad but true, these WP guys cannot understand that we build custom WP theme here. Seems they push us to providing theme that can work for any type of business. First GPL problem, now this new requirements, what next ? “We will move all your themes into wp.org theme repository” :D

Oh come now, that’s just silly. Then how could Envato make money?

But seriously, GPL is just a licensing option. Nobody is forcing it on anyone. It’s making more options available to creators that want it, not taking any options away or limiting you in any fashion.

Yeesh, overdrama much?

IN SUMMATION

Most of these guidelines are built around the principle of forward-thinking. Consider the full life cycle of your theme. Eventually, your users will want to move from your theme (or ‘full website solution’) to another theme instead. When that happens, will their existing content that they’ve spent the past few years building suddenly break? Disappear? It shouldn’t. If it does, you’re doing_it_wrong().

10 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Located in United States
georgestephanis says



If a theme author can’t even get their theme to pass Theme Check’s ridiculously dumb checks, then it’s probably not worth the valuable time of our reviewers to even look at.
I completely disagree with you. Theme check’s flags even Google recaptcha library. The main goal of theme check was to ease the work wordpress.org reviewers.
Why would you use the Google recaptcha library in a theme?

I imagine a number of themes bundle it in an effort to win a perceived ‘Soviet Arms Race’ with the idea that you should buy their theme because it has more shiny toys bundled with it.

by
by
by
by
by
by