Home Forums Xi Theme Discussion & Support Widget: Show Media Posts

This topic is: resolved

This topic contains 18 replies, has 2 voices, and was last updated by  Richard 4 years, 1 month ago.

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #3307

    Richard
    Participant
    Post count: 181

    I am wondering if there is a way to remove the ‘no audio’ info in the widget? I am using the Widget for other media (i.e. YouTube embeds) and feel this would be helpful. Possible?

    #3308

    themeweaver
    Keymaster
    Post count: 730

    Actually yes, there is a filter (http://themeloom.com/support/framework-codex/developers/filters-reference/) you can use to change this text.

    add_filter( ‘livingos_media_noaudio_message’, ‘Your message or empty’ );

    Add this to your child theme functions.php.

    #3311

    Richard
    Participant
    Post count: 181

    Cool … um where do I find the Child Theme Functions.php? I looked in Appearance->Editor->LivingOSXi Theme and there are many PHP, but I do not see one called ‘Child Theme Functions?’

    #3313

    themeweaver
    Keymaster
    Post count: 730

    You have to create a child theme first.

    #3316

    Richard
    Participant
    Post count: 181

    Oh … is that easy to do?

    #3319

    themeweaver
    Keymaster
    Post count: 730
    #3321

    Richard
    Participant
    Post count: 181

    So I cannot just add it to the Custom Code section?

    #3322

    themeweaver
    Keymaster
    Post count: 730

    You mean the Custom CSS section? No this is for CSS. The code above is PHP.

    #3323

    Richard
    Participant
    Post count: 181

    Ah – thx. I’ll have to see if this is a wee bit beyond me or not with the time frame I have. Thanks for the input!

    #3325

    Richard
    Participant
    Post count: 181

    Hmmm … I have the child theme in place:

    style.css:

    /*
    Theme Name:     UCiM
    Theme URI:      http: //ucim.org/httpdocs/wp-content/themes/LivingOS_Xi-1/UCiM
    Description:    UCiM LivingOS_Xi Tweak
    Author:         UCiM
    Author URI:     http: //ucim.org/
    Template:       LivingOS_Xi
    Version:        1.0
    Tags:	buddypress
    */
    
    /* import parent styles */
    @import url("../LivingOS_Xi/style.css");

    and have added this to the functions.php:

    <?php add_filter( ‘livingos_media_noaudio_message’, ''  ); ?>

    But it seems not to remove the ‘No audio.’ What am I missing? As well, since I created the Child Theme, can I move my Custom CSS directly to the new style.css?

    #3348

    Richard
    Participant
    Post count: 181

    Sorry to bump – but have you had a chance to review this and is there something I am missing?

    #3349

    themeweaver
    Keymaster
    Post count: 730

    Maybe try this instead:

    function mymessage(){
    
    return '';
    
    }
    add_filter( ‘livingos_media_noaudio_message’, 'mymessage'  );

    And yes you can put your custom css in the child style.css/

    #3388

    Richard
    Participant
    Post count: 181

    I still seem to be unable to get this to work. The functions.php file is in the custom theme directory and the CSS fle is working fine fwiiw. this is the PHP code in the functions.php file. Thoughts?

    <?php 
    
    function mymessage(){
     
    return '';
     
    }
    add_filter( ‘livingos_media_noaudio_message’, ''  );
    
    ?>
    #3389

    themeweaver
    Keymaster
    Post count: 730

    needs to be

    add_filter( ‘livingos_media_noaudio_message’, ‘mymessage’ );

    The second parameter of the add_filter function should be a function name. Yours is an empty string.

    #3390

    Richard
    Participant
    Post count: 181

    Okay – so how should it look if I want there to be no message?

Viewing 15 posts - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.