Answer the question
In order to leave comments, you need to log in
How to fit large code into a word for easy insertion into php?
Tell me, please:
Is there any code, well, for example:
<div class="post-meta-top entry-meta">
<div class="row">
<?php if(is_rtl()): ?>
<div class="col-md-6">
<?php echo get_the_category_list(); ?>
<?php the_tags('<ul class="post-tags"><li>','</li><li>','</li></ul>'); ?>
</div>
<div class="col-md-6">
<div class="post-date"><?php _e('Posted on', 'pluto'); ?> <time class="entry-date updated" datetime="<?php echo get_the_date( 'c' ); ?>"><?php echo get_the_date(); ?></time></div>
<div class="post-author"><strong class="author vcard"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) )) ; ?>" class="url fn n" rel="author"><?php echo get_the_author(); ?></a></strong> <?php _e('by', 'pluto'); ?></div>
</div>
<?php else: ?>
<div class="col-md-6 p-data-author">
<div class="post-date"><?php _e('Posted on', 'pluto'); ?> <time class="entry-date updated" datetime="<?php echo get_the_date( 'c' ); ?>"><?php echo get_the_date(); ?></time></div>
<div class="post-author"><?php _e('by', 'pluto'); ?> <strong class="author vcard"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) )) ; ?>" class="url fn n" rel="author"><?php echo get_the_author(); ?></a></strong></div>
</div>
<div class="col-md-6 p-cat-tag">
<?php the_tags('<ul class="post-tags"><li>','</li><li>','</li></ul>'); ?>
<?php echo get_the_category_list(); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php etotcode(); ?>
Answer the question
In order to leave comments, you need to log in
php.net/ob_start + php.net/ob_get_clean
And not a word, but a variable.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question