首页 » 网站推广 » php前台模板loop技巧_wordpress前端主轮回调文章评论分页前台直接到后台编辑

php前台模板loop技巧_wordpress前端主轮回调文章评论分页前台直接到后台编辑

访客 2024-12-18 0

扫一扫用手机浏览

文章目录 [+]

index.php文件:

<!DOCTYPE html>

php前台模板loop技巧_wordpress前端主轮回调文章评论分页前台直接到后台编辑

<html>

php前台模板loop技巧_wordpress前端主轮回调文章评论分页前台直接到后台编辑
(图片来自网络侵删)

<head>

<meta http-equiv=\"大众Content-Type\公众 content=\"大众text/html; charset=utf-8\"大众 />

<title><?php wp_title(); ?></title>

</head>

<body>

<?phpif(have_posts()):while(have_posts()):the_post();?><!--主循环-->

<h3><?php the_title();?></h3><!--文章标题-->

<p><?php comments_popup_link('零条评论','只有一条评论','%条评论','css','不许可评论');?></p>

<p><?php edit_post_link('修正文章');?></p><!--从前台直接跑到后台编辑,需登录管理员账号-->

<div><?php the_content();?></div><!--文章内容-->

<?php endwhile;?>

<?php endif;?>

<!--分页-->

<div><!--下一页--><?php next_posts_link('下一页 》》',3);?> <!--上一页--><?php previous_posts_link('《《 上一页');?></div>

index.php

</body>

</html>

single文件:

<!DOCTYPE html>

<html>

<head>

<meta http-equiv=\公众Content-Type\公众 content=\"大众text/html; charset=utf-8\"大众 />

<title><?php wp_title(); ?></title>

</head>

<body>

<?php

if(have_posts()):while(have_posts()):the_post();?><!--主循环-->

<h3><?php the_title();?></h3><h3><?php the_title();?></h3><!--文章标题-->

<p><?php comments_popup_link('零条评论','太少了只有一条评论','%条评论','css','不许可评论');?></p>

<p><?php edit_post_link('修正文章','before','后面');?></p> <!--前台跑到后台编辑-->

<div><?php the_content();?></div><!--文章内容-->

<!--分页-->

<div>下一篇文章:<?php next_post_link('%link >>','%title',true,99999,'post_tag');?></div>

<!-- next_post_link('%链接 >>','%标题',false,); -->

<div>上一篇文章:<?php previous_post_link('<< %link','%title');?></div>

<div><?php comments_template();?></div>

<?php endwhile;?>

<?php endif;?>

</body>

</html>

有没有资深wordpress建站高手?

走了很多弯路,好不容易找到一套wordpress视频教程,这是个中一节课的条记。
得到这套教程,有点相见恨晚的觉得。

上面的条记,你能看懂多少?评论区留言。

wordpress CMS,全天下最盛行的CMS。

wordpress

标签:

相关文章

php常量率低技巧_PHP 常量详解教程

PHP 常量常量是单个值的标识符(名称)。在脚本中无法改变该值。有效的常量名以字符或下划线开头(常量名称前面没有 $ 符号)。注释...

网站推广 2024-12-19 阅读0 评论0