开发者

page redirection in wordpress

what I have: a google search form (displayed on all pages) a wordpress page to display search results

what I want to do: when a search is performed, redirect 开发者_C百科to the page containing the search results

how do I do this?

the search results page is a wordpress-created page with a permalink domain.com/search-results


if your template files doesn't have a file called "search.php" then create one, this is were all the results will be shown, do a standard wp loop and style it.. thats if you were using the standard wp search, in this case

apply a template tag to the top of a new php page,

<?php
/*
Template Name: Search_Results
*/
?>
<?php get_header(); ?>
or include a new one
<?php include(TEMPLATEPATH . '/header_search.php'); ?>

<!-- INCLUDE GOOGLE SCRIPT -->

<?php get_sidebar();?>
<?php get_footer();?>

this should print out your results...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜