WordPress.org

Ready to get started?Download WordPress

Forums

OptionTree
[resolved] Need help adding Choices to a Select Type (4 posts)

  1. Yojance
    Member
    Posted 1 year ago #

    Hey Derek, fellow WordPress users,

    The issue I'm having is that I'm trying to include all Google Fonts in my theme and I just don't want to repeat the same array which has almost 550 lines ten times so I created an array like this:
    http://pastebin.com/36pNB8Eu

    and I'm including it on my theme-options.php file like this but it's not working.
    http://pastebin.com/jTSdF1J2

    What do you think I'm doing wrong? Thanks in advance.

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

  2. Derek Herman
    Member
    Plugin Author

    Posted 1 year ago #

    Where are you including the array. If the scope of the variable isn't available to you then it will be empty.

  3. Yojance
    Member
    Posted 1 year ago #

    Hi Derek,

    I solved the problem by using ot_recognized_font_families, didn't know it was there.

    Thanks.

  4. Derek Herman
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah, unfortunately there is a lot about OT that isn't documented or widely known that makes development easier. It's just difficult to get it all in there. Hopefully soon I'll be able to have a more comprehensive list of features and filters but for now the basics will have to do until I can find more time.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic