• Hi

    If you click on the category companies hiring gen. @ https://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 5 replies - 16 through 20 (of 20 total)
  • Thread Starter Scott@adszoom

    (@scottadszoom)

    its done works perfect here is the code

    <?php
    /**
     * The default template for displaying content
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    ?>
    
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<header class="entry-header">
    			<?php if ( is_sticky() ) : ?>
    				<hgroup>
    					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    					<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
    				</hgroup>
    			<?php else : ?>
    			<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    			<?php endif; ?>
    
    			<?php if ( 'post' == get_post_type() ) : ?>
    			<div class="entry-meta">
    				<?php twentyeleven_posted_on(); ?>
    			</div><!-- .entry-meta -->
    			<?php endif; ?>
    
    			<?php if ( comments_open() && ! post_password_required() ) : ?>
    			<div class="comments-link">
    				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
    			</div>
    			<?php endif; ?>
    		</header><!-- .entry-header -->
    
    		<?php if ( is_search() ) : // Only display Excerpts for Search ?>
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    		</div><!-- .entry-summary -->
    		<?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>' ) ); ?>
    		</div><!-- .entry-content -->
    		<?php endif; ?>
    
    		<footer class="entry-meta">
    			<?php $show_sep = false; ?>
    			<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
    				if ( $categories_list ):
    			?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if categories ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
    				if ( $tags_list ):
    				if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    				<?php endif; // End if $show_sep ?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if $tags_list ?>
    			<?php endif; // End if 'post' == get_post_type() ?>
    
    			<?php if ( comments_open() ) : ?>
    			<?php if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    			<?php endif; // End if $show_sep ?>
    			<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
    			<?php endif; // End if comments_open() ?>
    
    			<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
    		</footer><!-- #entry-meta -->
    	</article><!-- #post-<?php the_ID(); ?> -->

    its correct look on line 41 not 42 just change “content” with “excerpt” the goal was to get all existing posts to fall in line with the posts after the change and this worked perfect in the 2011 theme with 3.4.1 wp

    Thread Starter Scott@adszoom

    (@scottadszoom)

    thanks for your help on the other issue thu did contact the dev but like i said dont know if he or she will respond so i hacked and fixed..

    it is already using the_excerpt for search page on line 37

    what u made is using the_excerpt for all pages (like category, etc..) on line 41

    if u want to show the post thumbnail, put this code

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

    on line 36 before <div class=”entry-summary”>

    Thread Starter Scott@adszoom

    (@scottadszoom)

    Ha ok cool ya it was not grabbing the existing posts untill i changed the line 41 now it is and if you click it takes you to the correct view i need for single.php anyway i could not find the “the_content()” on search.php so i changed it there. So this code

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

    where exactly do i place this ? on search.php or content.php? where exactly ? new to wp so i have to ask these crazy simple questions but thanks for your help? just need complete walk threw on this one. If you have time..

    what is the code at the search.php file?

Viewing 5 replies - 16 through 20 (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.