ricardodecastro
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Installing WordPress
In reply to: Can't open /wp-admin/install.phpThe same thing happened to me and it was because of CGIBIN host.
change the permissions to:
755 for directories and
644 for php filesMaybe so. good luck
More informations: https://www.nsdesign.net/cgi-bin/helpdesk/cgi-bin/kb.cgi?do=read&id=94Forum: Fixing WordPress
In reply to: Separate search results by categoryNow the correct version of search.php
I have two categories to display in Search Results<?php get_header(); ?> <div class="content"> <?php $s = get_search_query(); ?> <div class="search"> <div class="categoryThumbs"> <?php if (have_posts()) : ?> <h3><?php printf( __( 'Search Results for: %s'), '<span>' . get_search_query() . '</span>' ); ?></h3> <?php endif;?> <?php query_posts("s='$s'&category_name=blog"); ?> <?php if (have_posts()) : ?> <?php $blogResults=0; ?> <?php while (have_posts()) : the_post(); ?> <?php $blogResults++; ?> <?php endwhile; ?> <h4><?php echo $blogResults; ?> Results in BLOG</h4> <?php while (have_posts()) : the_post(); ?> <div class="films"> <div class="thumb"> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a> </div> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <div class="entry"> <?php the_excerpt() ?> </div> </div> <?php endwhile; ?> <?php endif;?> <?php query_posts("s='$s'&category_name=films"); ?> <?php if (have_posts()) : ?> <?php $blogResults=0; ?> <?php while (have_posts()) : the_post(); ?> <?php $blogResults++; ?> <?php endwhile; ?> <h4><?php echo $blogResults; ?> Results in Films</h4> <?php while (have_posts()) : the_post(); ?> <div class="films"> <div class="thumb"> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a> </div> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <div class="entry"> <?php the_excerpt() ?> </div> </div> <?php endwhile; ?> <?php endif;?> <div class="spacer"></div> </div> </div> </div> <?php get_footer(); ?>
Forum: Fixing WordPress
In reply to: Separate search results by categorySorry, my “solution” is not right
Forum: Fixing WordPress
In reply to: Separate search results by categoryHellow
Im not speak english so sorry, but I have a solution if you have a few categories.
In the blog I’m working I have two categories that would like to display the search FILMS and BLOG, I’ll paste the code, hope that helps.
Then tell me if it worked<?php if (have_posts()) : ?> <h3><?php printf( __( 'Search Results for: %s'), '<span>' . get_search_query() . '</span>' ); ?></h3> <?php endif;?> <?php query_posts('category_name=blog'); ?> <?php if (have_posts()) : ?> <?php $blogResults=0; ?> <?php while (have_posts()) : the_post(); ?> <?php $blogResults++; ?> <?php endwhile; ?> <h3><?php echo $blogResults; ?> Results in BLOG</h3> <?php while (have_posts()) : the_post(); ?> <div class="films"> <div class="thumb"> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a> </div> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <div class="entry"> <?php the_excerpt() ?> </div> </div> <?php endwhile; ?> <?php endif;?> <?php query_posts('category_name=films'); ?> <?php if (have_posts()) : ?> <?php $fimlsResults=0; ?> <?php while (have_posts()) : the_post(); ?> <?php $filmsResults++; ?> <?php endwhile; ?> <h3><?php echo $filmsResults; ?> Results in Films</h3> <?php while (have_posts()) : the_post(); ?> <div class="films"> <div class="thumb"> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a> </div> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <div class="entry"> <?php the_excerpt() ?> </div> </div> <?php endwhile; ?> <?php endif;?>
Viewing 4 replies - 1 through 4 (of 4 total)