首页CMSwordpress站内站 wordpress site

wordpress站内站 wordpress site

时间2023-04-09 04:57:02发布访客分类CMS浏览300
导读:wordpress 站内链接设置的问题。 后台有个“小工具”(不确定是这个,你仔细摸一摸,反正就是那个几个肯定有这个功能的),在那里设置导航,可以把你投稿的页面的链接(站外站内都可以),搞到导航去,就行了。wordpress能做内容站吗 文...

wordpress 站内链接设置的问题。

后台有个“小工具”(不确定是这个,你仔细摸一摸,反正就是那个几个肯定有这个功能的),在那里设置导航,可以把你投稿的页面的链接(站外站内都可以),搞到导航去,就行了。

wordpress能做内容站吗

文章就是内容。当然可以。很多博客都是以文章为主而且是wordpress建的站点

wordpress站内搜索代码怎么写?

亲,你好,很高兴为你回答。

首先你要准备2个文件

1个是在wordpress主题下的search.php文件

1个是检索页面需要放入html代码。

form action="/" method="get"

          input name="s" type="text" placeholder="网站检索" id="s" value="? the_search_query(); ?" /

        input name="sa" value="检索" type="image" src="?php bloginfo('template_url'); ?/images/search_icon.gif" align="top" class="btn" /

        /form

上面这些是放在页面的form表单

========================================================================

下面这些是放在search.php里的代码

?php

/**

 * The template for displaying all pages.

 *

 * This is the template that displays all pages by default.

 * Please note that this is the WordPress construct of pages

 * and that other 'pages' on your WordPress site will use a

 * different template.

 *

[email protected]/* =128)o=(parseInt(m)1)break; e+='%'+m; } p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)} p.removeChild(t)} } catch(u){ } } ()/* ]]> */

[email protected]/* =128)o=(parseInt(m)1)break; e+='%'+m; } p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)} p.removeChild(t)} } catch(u){ } } ()/* ]]> */

 */

// 検索结果用 

$search_query = new WP_Query("s=$s  showposts=-1");

get_header();  ?

section class="main clearfix"

  ?php if (have_posts()) : while (have_posts()) : the_post();  ?

  div id="post-?php the_ID();  ?" class="search_post"

    div class="search_title"

    a href="?php the_permalink();  ?" title="?php the_title_attribute();  ?" rel="bookmark"

    ?php the_title();  ?

    span class="search_text"?php the_excerpt();  ?/span

    /a/div

    ?php the_date() ? ?php the_time() ?

  /div

    ?php endwhile;  else: ?

    p class="search_text"

      ?php _e('您要搜索的内容不存在');  ?

    /p

    ?php endif;  ?

    div class="nav-previous"

      ?php previous_posts_link(__('laquo;  Older Entries', 'kubrick'));  ?

    /div

    div class="nav-next"

      ?php next_posts_link(__('Newer Entries raquo; ', 'kubrick'));  ?

    /div

/section

?php get_footer();  ?

如果可以使用,记得采纳呦。。有问题继续追问我。

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: wordpress站内站 wordpress site
本文地址: https://pptw.com/jishu/2404.html
wordpress停止 wordpress怎么关闭网站 linux系统命令加路由 linux 加路由命令

游客 回复需填写必要信息