Trying to make a search for all blog posts

[ad_1]

​

​

<article id=”post-<?php the\\\_ID(); ?>” <?php post\\\_class(); ?>>

&#x200B;

<header class=”entry-header”>

<h1 class=”entry-title”><?php the\\\_title(); //Get current title editing Archieved version of blog?></h1>

</header><!– .entry-header –>

&#x200B;

<div class=”entry-content”>

<?php the\\\_content(); ?>

&#x200B;

<?php if(is\\\_active\\\_sidebar(‘archives-left’)) dynamic\\\_sidebar(‘archives-left’); ?>

<?php if(is\\\_active\\\_sidebar(‘archives-right’)) dynamic\\\_sidebar(‘archives-right’); ?>

<div style=”clear: both; margin-bottom: 30px;”></div><!– clears the floating –>

&#x200B;

<?php
$total\\\_posts = intval(get\\\_post\\\_meta($post->ID, ‘archived-posts-no’, true));
if($total\\\_posts > 200 || $total\\\_posts < 2) $total\\\_posts = 50; //cureent limit hardcoded will make dynamic
\&#x200B;
$my\\\_query = new WP\\\_Query(‘post\\\_type=post&nopaging=1’);
if($my\\\_query->have\\\_posts()) {
echo ‘<h1 class=”widget-title”>Last ‘.$total\\\_posts.’ Posts <i class=”fa fa-bullhorn” style=”vertical-align: baseline;”></i></h1>\\\&nbsp;’;
echo ‘<div class=”archives-latest-section”><ol>’;
$counter = 1;
while($my\\\_query->have\\\_posts() && $counter <= $total\\\_posts) {
$my\\\_query->the\\\_post();
?>

<li><a href=”<?php the\\\_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the\\\_title\\\_attribute(); ?>”><?php the\\\_title(); ?> <?php the\\\_content(); ?> <?php the\\\_tags(); ?></a></li>

<?php
$counter++;
}
echo ‘</ol></div>’;
wp\\\_reset\\\_postdata();
}
?>

&#x200B;

<form method=”post” action=”<?php echo $\\\_SERVER\\\[‘PHP\\\_SELF’\\\];?>”>

search: <input type=”text” name=”fsearch”>

<input type=”submit”>

</form>

&#x200B;

<?php
if ($\\\_SERVER\\\[“REQUEST\\\_METHOD”\\\] == “POST”) {
// collect value of input field
$search = $\\\_POST\\\[‘fsearch’\\\];
if (empty($search)) {
echo “search is empty”;
} else {
echo $search;
}
}
?>

&#x200B;

&#x200B;

&#x200B;

</div><!– .entry-content –>

&#x200B;

</article><!– #post-## –>

&#x200B;

[https://codeshare.io/9OWR4V])

&#x200B;

&#x200B;

&#x200B;

My issue of now is I can’t get the blog tags to echo out does anyone know how to echo tags associated with a blog post?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer