Get a free trial // Grow your CSS skills // Land your dream job

help with function

  • # December 29, 2012 at 2:46 pm

    I am working in WordPress. I am using Option Tree to get theme options. I made a logo. I can get the logo by doing this

    if ( function_exists( 'ot_get_option' ) ) {
    $logo = ot_get_option( 'logo' );

    I didn't want to type all that stuff out all the time so I tried to make a function that would be a shortcut. It's working but not returning the data. My src attribute is empty when it should contain the url to the photo Here is my function

    function get_kiss_options($kiss_option) {
    if( function_exists( 'ot_get_option' )){
    $option = ot_get_option( '$kiss_option' );
    return $option;

    Then I call it like so

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed