Okay
  Public Ticket #1720571
portfolio text
Closed

Comments

  • G started the conversation

    Hello and thanks for a beautiful and clean theme! 

    I was wondering, in UXportfolio, Is there a way on a mixed portfolio (both images and video) to also add a text block? Like the video caption, but with full formatting?

    Thank you in advance, 

    G.



  •  295
    Paul replied

    Hello!

    Thanks for the kind words!

    Unfortunately, there's no text block element to be used between image and video content in the Mixed format. I am sorry about that.

    Regards,
    Paul

  • G replied

    Hello Paul, and thank you for your swift reply! 

    Is there then a way for the video caption to correctly show the text formatting? Because right now it strips down every html formatting I tried to apply. That would be greatly appreciated.

    Thank you for your time, 

    G.


  •  295
    Paul replied

    In this case, you would need to use a child theme to override the related function of the parent theme. Please first create a new child theme then try adding this code into the "functions.php" file of the child theme:

    function kathy_print_portfolio_video_format_content( $video_url, $caption = '' ) {
            
            echo '<div class="port-format-item video-wrapper">' . wp_oembed_get( esc_url( $video_url ) );
            
            if ( ! empty( $caption ) ) {
                echo '<div class="image-caption content-width">' . $caption . '</div>';
            }
            echo '</div>';
        }
    

    Now the $caption variable of the video will not be escaped so any HTML can be displayed.

    For the how-to article about creating child themes, please see: https://uxbarn.ticksy.com/article/8649/

    I hope this helps!