Support » Plugin: MAS Videos » Ordering videos

  • Resolved gmass69

    (@gmass69)


    Hi,

    We need to order our videos items and I wanted to create a custom attribute to index them but after adding the customing attribute it doesn’t appears anywhere.

    Is this functionality still in construction? Or how does this work?

    We currently use the latest version of the plugin 1.1.8 on WordPress 5.3.2

    Thank you,
    Guillaume

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Farook Ibrahim

    (@farookibrahim)

    Hello @gmass69,

    Thank you for reaching us. Custom Attributes are displayed after the Description in single video page. Please make sure you enabled “Visible on the video page” checkbox when adding attributes.

    Regards

    Hello Ibrahim!

    OK thank you I see now.

    If I don’t want to show it leaving this checkbox unchecked but want to access its value for current video how should I do in the code please ?

    Also is there a setter function for these custom attributes ?

    Thanks again

    Plugin Author Farook Ibrahim

    (@farookibrahim)

    Hello @gmass69,

    You can use below code in single video page to get or set attributes.

    
    global $video;
    
    // Get all attributes
    $attributes = $video->get_attributes();
    
    // Get specific attribute
    $size = $video->get_attribute( 'Director' );
    
    // Set attributes
    $video->set_attributes( $attributes );
    

    Hope this helps.

    Regards

    OK thank you very much ! Yes it helps 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.