This is how the Display Posts shortcode looks on a live page using the Twenty Seventeen theme. The Display Posts shortcode will show a bulleted list of the 10 most recent posts by default. It is possible to customize the number of posts as well as the style, and what elements of the po...
Add the[display-posts]shortcode in a post or page. Use thequery parametersto filter the results by tag, category, post type, and more. You can customize the output using thedisplay parameters, or use atemplate partto match your theme exactly. Developers can take it even further using theav...
Display Posts 就是这样一个可以帮助你灵活组合套餐的插件。 Display Posts – Easy lists, grids, navigation, and moreAuthor(s): Bill EricksonCurrent Version: 3.0.1Last Updated: 2019-01-07display-posts-shortcode.3.0.1.ziphref="wordpress.org/support/v">98%Ratings"https://downloads.wordpress.org/...
首先,您需要安装并激活Display Posts Shortcode插件。有关更多详细信息,请参阅我们关于如何安装 WordPress 插件的分步指南。 激活后,您需要编辑要显示最近页面的帖子、页面或小部件,并添加以下短代码。 [display-posts post_type="page" include_excerpt="true" excerpt_more="Continue Reading" excerpt_more_link="tr...
Go beyond any standard WordPress shortcode plugin. Easily make a website using shortcodes, templates, snippets, custom post types, and more.
Conductor plugin makes it easy to display WordPress content blocks such as grids, lists, and tables of content. Use Conductor in a widget or shortcode.
ShortcodesShortcode provide output to the front-end side2 Types of shortcode8 Types of shortcode Shortcode ParametersAdd extra power to the shortcode1030+ Trending Post SupportDisplay trending posts as well.✗✓ WP Templating FeaturesYou can modify plugin html/designs in your current theme.✗✓...
Step 3-Add the self-closing shortcode to the website: Now that you’ve defined your shortcode function, you can add the shortcode itself to your WordPress posts or pages. This is done by placing the shortcode name inside square brackets like this: ...
但那样也太傻了。一开始走了点弯路,什么异步获取,什么写WP_Query。后来发现了一个最简单办法:WordPress的模板PHP文件里可以直接把shortcode的内容显示出来,有一个函数do_shortcode(),这就太方便了,把之前在另一篇文章里用到的插件display posts的shortcode 直接拿过来就行了。下面就是开始代码部分了。
function suxing_insert_posts( $atts, $content = null ){ extract( shortcode_atts( array('ids' => ''), $atts ) ); global $post; $content = ''; $postids = explode(',', $ids); $inset_posts = get_posts(array('post__in'=>$postids)); foreach ($inset_po...