傻大憨

wordpress调用全站随机文章

wordpress调用全站随机文章代码

<?php

global $post;

$postid = $post->ID;

$args = array( ‘orderby’ => ‘rand’, ‘post__not_in’ => array($post->ID), ‘showposts’ => 10); // 显示篇数

$query_posts = new WP_Query();

$query_posts->query($args);

?>

<?php while ($query_posts->have_posts()) : $query_posts->the_post(); ?>

<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>

<?php endwhile; ?>
Published
Categorized as 建站知识 Tagged

By 傻大憨

shadahan.com是一个关注跨境电商、创业话题的网站。

WordPress外贸网站建设的核心元素与实际案例

  在竞争激烈的外贸市场中,成功建设一个专业且高效的WordPress外贸网站需要精心策划和正确实施。本文将深… Continue reading WordPress外贸网站建设的核心元素与实际案例

wordpress企业网站模板包含的页面

常见wordpress企业网站模板包含的页面

The best WordPress service company in China

Jianzhanpress not only excels in WordPress theme design, but also has significant advantages in the field of foreign trade website construction, which can help enterprises achieve success in the international market.

WordPress外贸建站服务成功案例分析

  在当今数字化时代,一流的WordPress外贸建站服务是企业在国际市场上取得成功的关键。通过成功案例分析,… Continue reading WordPress外贸建站服务成功案例分析

建一个外贸B2B独立站的费用预算1000元够吗

1000元可以作为建立外贸B2B独立站的最低预算起点,但要实现一个功能齐全、用户体验良好的站点,实际投入可能需要远超此数额。

WordPress菜单函数wp_nav_menu各参数

在不同的位置调用不同的菜单,使用下面的这个代码