WordPress.org

Support

Support » How-To and Troubleshooting » I get 0 results using search by category but if i click the category link it has

I get 0 results using search by category but if i click the category link it has

  • Hi

    If you click on the category companies hiring gen. @ http://www.adszoom.com under “ jobs “ there are plenty of results but if you use the “ search by category “ at the top of the home page or any other, If you search the same category companies hiring gen. this way 0 results com up Why is this? Its not just that category its site wide.

    Help please :}

Viewing 15 replies - 1 through 15 (of 20 total)
  • I’m guessing it’s a coding error, but we’d need to see your code for that section of the site. Please go to Pastebin.com and paste the code there, then give us the link so that we can take a look.

    Hi

    Ya I changed 0 code from default 2011 theme but am using this plug in ” search by category ” by ” Fire G ” so i went to the PLUG IN’S site for more info and it was a mess nothing worked there as well so i think im going to find a better ” search by cat ” plug in and start there. If there are coding issues its there…… Do you have a better plug in for this off the top of your head ? Or should i just wright it my self?

    I forgot to tell ya its a child of the 2011 theme…

    remove “Search for…” from the input field and tell me if it works

    lol ya works like a charm how did you know?

    🙂

    contact the plugin author for him to fix it, if he doesn’t i will fix for you

    cheers

    THANKS! hay quick question…. if i wanted just to show excerpts on these results page how do i change that real quick the problem is i changed to this new theme i built and there was about 12k posts already and the theme shows the full post ( no good ) on pre existing posts.

    Any idea?

    edit search.php file, there is “the_content()”

    replace with “the_excerpt()”

    in content.php correct because this edit search.php file, there is “the_content()”

    replace with “the_excerpt()” is not on the search.php in the 3.4.1 ver wp

    <?php else : ?>
    		<div class="entry-content">
    			<?php the_excerpt( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>

    like this ? works for me but just to conf… how about showing the thumb nail in the excerpt ?

    you mean showing featured image in the excerpt

    <?php
    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    the_post_thumbnail();
    }
    ?>

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

    Hi

    ya i replaced line i think 42 in the content.php because i could not find ‘the_content()’ in search .php did i miss it? is that ok what i did in that code pice above? and this snippet you just posted will that show the thumb nail in the excerpt on search.php ? this on?

    <?php
    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    the_post_thumbnail();
    }
    ?>

    that go’s in functions.php correct how do you call it? on search.php and will it also show the thumbnail if the category template is called?

    where did you replace the_content with the_excerpt, put the snippet i gave u before or after depends on where u want to show the thumbnail on the search page

    I replaced it in the line 42 of content.php

    was that right ? i think it was for the default 2011 the theme im working on is a child of that

    i have no idea if it is right or wrong, you should see the output

    i need to see the code to be more sure

    i advise you to hire someone on freelance to do this 1hour job

    regards

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘I get 0 results using search by category but if i click the category link it has’ is closed to new replies.