Saturday, September 24, 2022
HomeWordPress Developmenttheme growth - How you can customise content-video.php file in wordpress as...

theme growth – How you can customise content-video.php file in wordpress as is in html file?


I hope all of you’re nice,

I am newbie, and I am changing an HTML website to a WORDPRESS THEME
and I am utilizing the content-video.php file because the supported format within the theme.

There are two potentialities for the consumer:

Both he uploads a video by which case WordPress will routinely generate a shortcode,
or he places an exterior hyperlink from youtube, vimeo…and many others by which case WordPress will convert the hyperlink into an tag.

So please, how can I try this?

I’ll connect the html file I wish to implement (the ultimate output) and the content-video.php file so you’ll be able to see what I did.

Let me share the html weblog web page hyperlink to indicate you the way displaying the video (the video submit within the backside) : https://consulty.hatemfrere.com/weblog.html

It’s your decision further data .. I’m able to give you another data, information or codes if you’d like.

Thanks upfront

ATTACHMENTS :

  • HTML File (Ultimate Output) :
<div class="video">
    <div class="inner-box">
        <determine class="image-box">
            <img src="src/photographs/pages/weblog/news-19.jpg" alt="news-19">
            <span class="class">enterprise</span>
            <div class="video-btn">
                <a href="https://www.youtube.com/watch?v=A3jc8bV13jM" class="lightbox-image" data-caption=""><i
                        class="fas fa-play"></i></a>
            </div>
        </determine>
        <div class="lower-content">
            <ul class="post-info clearfix">
                <li><i class="far fa-user"></i><a href="weblog.html">Admin</a></li>
                <li><i class="far fa-calendar-alt"></i>March 19, 2020</li>
                <li><i class="far fa-comment-alt"></i><a href="weblog.html">97
                        Feedback</a></li>
                <li><i class="far fa-heart"></i><a href="weblog.html">1.5k Likes</a></li>
            </ul>
            <h2><a href="blog-details.html">Taking Motion For Advantages Of Enterprise</a></h2>
            <p>Eabore etsu dolore magn aliqua enim veniam quis nostrud exercitas reprehenderit
                voluptate sed bvelit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
                occaecat cupidatat non.</p>
            <div class="hyperlink"><a href="blog-details.html"><i class="fas fa-arrow-right"></i><span>Learn Extra</span></a>
            </div>
        </div>
    </div>
</div>
<?php 
/**
 * -- Video Publish Format
 */
if ( has_post_format( 'video' ) ) {
?>
<div id="post-<?php the_ID(); ?>" <?php post_class('video'); ?>>
    <div class="inner-box">
        <determine class="image-box">
            <img src="<?php echo CONSULTY_THEME_DIR_URI . '/src/photographs/pages/weblog/news-19.jpg' ?>" alt="news-19">
            <span class="class"><?php the_category( ', ' ); ?></span>
            <div class="video-btn">

                <a href="https://www.youtube.com/watch?v=A3jc8bV13jM" class="lightbox-image"
                    data-caption="">
                    <i class="fas fa-play"></i>
                </a>
            </div>
        </determine>
        <div class="lower-content">
            <ul class="post-info clearfix">
                <li>
                    <i class="far fa-user"></i><a
                        href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php the_author(); ?></a>
                </li>
                <li><i class="far fa-calendar-alt"></i><?php the_time('F jS, Y') ?></li>
                <li><i class="far fa-comment-alt"></i>
                    <?php //comments_popup_link(); 
                            comments_popup_link( 'No Remark', '1 Remark', '% Commentston', '', 'Feedback Off' );
                            ?>
                </li>
                <li>
                    <i class="far fa-folder"></i>
                    <?php
                                                $classes     =   get_the_category();
                                                $separator=", ";
                                                $output="";

                                                if ( $classes ) {
                                                    foreach ( $classes as $class) {
                                                        $output .=  '<a href="' . get_category_link( $category->term_id ) . '">' . $category->cat_name . '</a>' . $separator;
                                                    }
                                                    echo trim($output, $separator);
                                                }
                                            ?>
                </li>
            </ul><!-- /ul /.post-info -->
            <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
            <p>
                <?php the_excerpt(); ?>
            </p>
            <div class="read-more-link">
                <a href="<?php the_permalink(); ?>">
                    <i class="fas fa-arrow-right"></i>
                    <span><?php _e('Learn Extra'); ?></span>
                </a>
            </div>
        </div>
    </div>
</div><!-- /.video -->
<?php } ?>

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments