Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8221647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:59:58+00:00 2026-06-07T13:59:58+00:00

I have created a search form and search.php file to display the result. The

  • 0

I have created a search form and search.php file to display the result. The only thing is that, I want to filter including the tags instead the content and titles only. Is there any wordpress function for this process?

Search Form Code:

<?php if(is_category(array('general-support','activities','discount-cards','equipment','financial','holidays','medical','respite')) || is_single()){?>

<div style="width:auto; margin:0px 40px 0px 20px;">

    <form role="search" action="<?php bloginfo('siteurl');?>" style="margin:0px; padding:0px;">

        <div>
            <h2>Search for</h2>
            <div><input type="text" name="s" id="s" style="width:100%; padding:5px; border:1px solid #ccc; box-shadow:inset 1px 1px 1px #f0f0f0;" /></div>
            <div><input type="hidden" value="14,16,21,18,20,15,22,19,17" name="cat" id="scat" /></div>
        </div>

    </form>

</div>

<?php } ?>

Search.php

<?php query_posts($query_string . '&showposts=10'); ?>

<?php if (have_posts()) : ?>

    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

<?php while (have_posts()) : the_post(); ?>


<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <div class="entry">

        <!--start.entry-wrapper-->
        <div class="entry-wrapper">

            <!--start.post-thumbnail-->

            <?php if(has_post_thumbnail()){?>

            <div class="post-thumbnail-wrapper">
                <a href="<?php the_permalink();?>">
                    <?php the_post_thumbnail('category-thumb'); ?>
                </a>
            </div>

            <?php } ?>

            <!--end.post-thumbnail-->

            <!--start.post-entry--->
            <div class="post-enry-wrapper">
                <h2><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'udesign' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
                <div class="postmetadata">
                    <?php the_content();?>              
                </div>
            </div>

            <!--end.post-entry-->
            <div class="clear"></div>
        </div>
        <!--end.entry-wrapper-->

    </div>

    <?php if(!is_category() && !is_single()){?>

    <div><?php if(function_exists('kc_add_social_share')) kc_add_social_share(); ?></div>

    <?php }?>

</div>
<div class="addGap"></div>
<?php endwhile; ?>

<div class="clear"></div>

<?php       // Pagination
if(function_exists('wp_pagenavi')) :
    wp_pagenavi();
else : ?>

    <div class="navigation">
    <div class="alignleft"><?php previous_posts_link() ?></div>
    <div class="alignright"><?php next_posts_link() ?></div>
</div>

<?php       endif; ?>

Please advise, I don’t like to use any plugin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:00:00+00:00Added an answer on June 7, 2026 at 2:00 pm

    Presuming I understand your question, this should help:

    http://codex.wordpress.org/Function_Reference/wp_get_post_terms

    if you have multiple taxonomies (more than just tags) and wish to merge them into a single alpha sorted array, let me know. Somewhere I have a function that does that merge / sort.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a search form that I want to forward on submit. The
I have created my application that has search form and below contains results for
I've created a search form for a script in php. Basicaly this form have
I have a PHP and jQuery script that creates search result suggestions from a
I have created a keyword search in SQL that takes a list of keywords
Good Morning, I have created an ASP.NET 3.5 webform that allows users to search
I have successfully setup an HTML form in PHP File #1, and it is
I have created a search form with get method. But when the url looks
I have created a form where the user can search the database, and the
I have three simple html or php file that I'm going to create. What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.