Posts by valendesigns

119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says

Thanks guys, but unfortunately your method doesn’t work either. When in the backend of WP you can’t check for a page template. I know because i’ve used metaboxes in this way in the past, and maybe i don’t know enough, but everything i tried didn’t work. is_page_template returns nothing in the admin. So in the past i’ve used _wp_page_template meta … Anyway, i asked if that array(pages) was modified in order to work with templates..
Yes, _wp_page_template will work, but again only after the post has been saved.

Unfortunately, it can’t be modified to work with templates as it limited to what the add_meta_box function excepts as parameters. That is unless you can think of a workaround.

119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says

Just wanted to mention that OptionTree is the 36th most popular plugin in the WP Directory at the moment. Thanks everyone! Also, 2.0.8 should fix all the backwards compatibility issues and I’ve added a way to download your settings into a theme-options.php and it’s not just a var_export() either.

119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says

Parker is correct, you’d have to test for the template and it would only work after it’s been saved once.

119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says



Hi Derek Version 2.0 rocks!! Is there any way to include a custom meta box only in a page template?
Can you elaborate because there are a couple ways I can interoperate that question?
I want to put a custom meta box inside a custom page template.. Like this:
$my_meta_box = array(
    'id'        => 'rb_',
    'title'     => 'My Meta Box',
    'desc'      => '',
    'pages'     => array( 'template-home.php' ),
    'context'   => 'normal',
    [ .... ]
It should be visible only inside that template, not in any other page..

Sorry, that will not work. The ‘pages’ array refers to the post_type in the add_meta_boxes() function. You can read more about it here http://codex.wordpress.org/Function_Reference/add_meta_box but basically it excepts any valid post type.

119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says

Hi Derek Version 2.0 rocks!! Is there any way to include a custom meta box only in a page template?

Can you elaborate because there are a couple ways I can interoperate that question?

119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says

I need to update the docs those should have a 2 and not a 1 for the amount of variables being passed, sorry!

119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says

Could anyone explain, how to make Google Fonts available for Typography option? I have done this:
function filter_ot_recognized_font_families( $array, $field_id ) {

  /* only run the filter when the field ID is my_google_fonts_headings */
  if ( $field_id == 'my_google_fonts_headings' ) {
    $array = array(
      'sans-serif'    => 'sans-serif',
      'open-sans'     => '"Open Sans", sans-serif',
      'droid-sans'    => '"Droid Sans", sans-serif'
    );
  }

  return $array;

}
add_filter( 'ot_recognized_font_families', 'filter_ot_recognized_font_families', 10, 1 );
But don’t understand how this could help.
add_filter( 'ot_recognized_font_families', 'filter_ot_recognized_font_families', 10, 2 );
119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says



Hi derek,

v2.0.7 breaks everything. There’s an error with the css and js enqueuing I guess…

Basically the scripts URL is a mix of the plugin location and the ot folder location of the theme…

Parker
I highly doubt it’s broken. In what way do you use the plugin, as a plugin or in theme more? I need to know more about your setup. Also, if you send me a copy of your theme to derek[at]valendesigns.com I’ll tell you exactly why it’s not working.

Hi Derek,

well, v2.0.6 is working… so. I’m using ot in theme mode (no plugin in plugins folder, only in theme root) as for your instructions. Everything was working fine before. The settings array is created by me (not generated) and it’s correct.

My theme isn’t published yet, so I’m not in a hurry, I’m just testing everything to help you out.

In my previous post I’ve explained what’s causing the error. If nobody will experience this in the next hours I’ll send you my theme eventually.

I don’t want to overcharge you now, you should be busy already ;)

Parker

Please just send it I need to see whats happening so I can either fix it or make a suggestion on how you could change your theme. Either way it’s now or later and I’m not going to have time later this week to focus on OT, I need to make this progress now.

119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says

Hi derek,

v2.0.7 breaks everything. There’s an error with the css and js enqueuing I guess…

Basically the scripts URL is a mix of the plugin location and the ot folder location of the theme…

Parker

I highly doubt it’s broken. In what way do you use the plugin, as a plugin or in theme more? I need to know more about your setup. Also, if you send me a copy of your theme to derek[at]valendesigns.com I’ll tell you exactly why it’s not working.

119 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says

Hey Guys,

I’m working on a way to export the theme options to a PHP file, should be available early this coming week. It’s a bit more than just a var_export() as I want it to include the add_action() and build a complete file like the demo-theme-options.php but with your saved settings so all you need to do is include it. You should test it and check it for errors before you use though just to be safe.

Cheers, Derek

by
by
by
by
by
by