WordPress.org

Ready to get started?Download WordPress

Forums

OptionTree
[resolved] How to use option tree (15 posts)

  1. ananddesigner
    Member
    Posted 1 year ago #

    dear sir,
    i am new on wordpress.i am getting confuse how to use this plugin.please guide me.

    i have already create a textbox for change some text.and give a unique id .and also i have use this id those place where i want to change text.but there are nothing happening.

    please guide me.

    thanks in advance.

    http://wordpress.org/extend/plugins/option-tree/

  2. htvu
    Member
    Posted 1 year ago #

    In your template, where you want to show the text, use:

    echo ot_get_option("id_of_textbox","Here is default text");

  3. ananddesigner
    Member
    Posted 1 year ago #

    thanks. can we use any text editor instead of text area for custom formatting?

  4. htvu
    Member
    Posted 1 year ago #

    Yes, you can use text editor (Tinymce) for custom formatting fields by using textarea type (not textarea-simple). But if you want to use text editor in metabox you need some addition codes.

  5. ananddesigner
    Member
    Posted 1 year ago #

    thanks, actually i am a web designer not php coder.so can u help me? can you give me that additional code for text editor.

    thanks in advance.

  6. htvu
    Member
    Posted 1 year ago #

    It not easy to help you here because it is require edit more places in some files both js and php. Addition it base on your option settings. So I don't know exactly where to edit in your code.

  7. ananddesigner
    Member
    Posted 1 year ago #

    thanks.i will do something about this later.i have a question...
    can i use my own content slider with create dynamic slide and if yes then tell me how is it possible...?
    help?

  8. hiredgunsdesign
    Member
    Posted 1 year ago #

    I am using the Daily Press theme with the Option Tree plugin and my home page is blank. What am I doing wrong? I see that I am supposed to set up the categories, but I just want it to show my recent blog posts. How do I do this? http://sccba-news.com

  9. htvu
    Member
    Posted 1 year ago #

    OptionTree doesn't help you show data. It just help you store settings for your site. OptionTree is create for coder. Your code (in theme) must read OptionTree settings and generate/show data (post/page) base on settings.

  10. Derek Herman
    Member
    Plugin Author

    Posted 1 year ago #

    @htvu you're awesome! I see you more than anyone in here answering questions. Thank you!

    @ananddesigner The documentation in OptionTree should be enough to get you started. Have you read it? If you have, and you still feel puzzled on where to start, my suggestion would be to seek a developer that can help with your project.

    @hiredgunsdesign Please start your own topic if you have questions. You'll have a better chance at getting an answer.

  11. htvu
    Member
    Posted 1 year ago #

    @Derek you're welcome. I l love this plugin and I'm using it for my new theme in ThemeForest. I made some changes on the plugin and I just want give a little help.

  12. ananddesigner
    Member
    Posted 1 year ago #

    hi, first i have to say..this plugin is awesome..
    i have a problem..i am using a slider. i am able to use slider loop.
    <?php
    if ( function_exists( 'get_option_tree' ) ) {
    $slides = get_option_tree( 'intro_page_slider', $option_tree, false, true, -1 );
    foreach( $slides as $slide ) {
    echo '

  13. <img src="'.$slide['image'].'" alt="'.$slide['title'].'" />

  14. ';
    }
    }
    ?>
    and now i want to also add a UL in lI.
    please help..

  • Derek Herman
    Member
    Plugin Author

    Posted 1 year ago #

    Please use ot_get_option( 'intro_page_slider' ); instead, the other function was deprecated.

    if ( function_exists( 'ot_get_option' ) && $slides = ot_get_option( 'intro_page_slider' ) ) {
    
      $content = '';
    
      foreach( $slides as $slide ) {
    
        if ( isset( $slide['image'] ) && isset( $slide['title'] ) ) {
    
          $content.= '<li><img src="' . $slide['image'] . '" alt="' . $slide['title'] . '" /></li>';
    
        }
    
      }
    
      echo '<ul>' . $content. '</ul>';
    
    }
  • Shovan Sargunam
    Member
    Posted 11 months ago #

    Thanks it works perfect
    <?php echo ot_get_option( 'id_text_area' ); ?>

  • patrickd
    Member
    Posted 4 months ago #

    @ananddesigner you busted the page! lol

  • Topic Closed

    This topic has been closed to new replies.

    About this Plugin

    About this Topic

    Tags

    No tags yet.