WordPress我该如何分组

I want to create loop slit as sample above and what should I change my carousel loop item below. Here is what i have === 0){echo \"active\";} ?>\"> - This topic was modified 9 months, 4 weeks ago by Steven Stern (sterndata). I want to create loop slit as sample above and what should I change my carousel loop item below. Here is what i have done I\"m unsure what you\"re after. I think you want 3 posts in each carousel item instead of one, is that right? You can use your $1此计数器,除非必须重命名它,否则不能在$后面用数字启动PHP变量名。假设它被重命名为$x。使用模运算符%得到整数除法后的余数。当余数==2时,输出一个结束div标签和一个新的开始carousel item div. if ( 2 == $x % 3 ) { echo \" The very first opening div must be before the loop starts and the very last closing div must occur after the loop ends. Thanks for your response. it has generated three columns in a row but not sliding. How do echo active carousel-item active? Thanks for your response. it has generated three columns in a row but not sliding. How do I echo active carousel-item active? Kindly view what I have done so far below. When I view the source code in the browser, it generates three column in each carousel-item but not displaying it on the front-end of the website as everything remains blank. What am I getting wrong on the code and also what should I add to generate \"carousel-item active\"? \" ;?> - 此回复是由bcworkz在9个月前修改的。原因:代码修复了 这里解决了不滑动的问题,但它确实在一行中生成了三列。帮我检查==$x%3){echo\"active\";}?>;\">;<;?php telegraph_post_thumbnail()?>;<;div> - bcworkz于9个月前修改了此回复。原因:代码修复 更像这样==$x%3){?>;<;/div>;<;!--carousel item-->;<;div> 要运行carousel,需要执行初始化它的JavaScript代码。这通常由提供旋转木马功能的主题或插件来完成。请检查浏览器控制台中是否存在JavaScript错误,这些错误可能会阻止carousel脚本按预期工作。 如果您使用的是WP v5.5,并且carousel以前工作过,但现在不工作,则可能需要jQuwry Migrate Helper插件。 在这些论坛中发布代码时,请使用\"代码\"按钮或用记号划界。否则,您的代码会被论坛的解析器损坏。如果我不能为您修改回复的代码,复制和编辑您的代码是很困难的。 预计到达时间:?>添加到第4行的末尾, 这是更新的==$x%3){?>;<;/div>;<;!--carousel item-->;<;div> 我检查了carousel css行,发现了关闭div的命令。我已经更新了它,但它并没有在一行中创建三列。帮我检查并让我知道==$x%3){中缺少什么?>;<;/div>;<;!--carousel item-->;<;div> - 此答复是由bcworkz在9个月前,即3周前修改的。 the_excerpt()似乎已经输出了标记,因此您可能不需要在模板代码中使用它们,即您不需要这些p标记: 与您的问题无关,我注意到了。 这段代码在一个carousel项目中输出了3篇文章。如果它们是垂直堆叠而不是水平堆叠,则CSS需要调整。确保每个post的容器(.carousel-caption.text-left)向左浮动,其宽度不超过33%。 如果可以,下次发布代码时,请尝试使用具有换行符和缩进的版本。您发布的没有空格的版本很难分析。 我已经按照指示进行了更新,但整个过程梅塞杜普。好心帮我看看这个代码,让我知道我遗漏了什么。不工作==$x%3){?>;<;/div>;<;!--容器-->;<;/div>;<;!--carousel item-->;<;div> 当post计数可被3整除时,在末尾会生成一个额外的空div。为了解决这种可能性,请将if ( 2 == $x % 3) {行改为: post_count - 1)> Otherwise your code correctly generates 3 posts in every carousel-item div. What purpose does the carousel-inner div serve? Could it be you need a new carousel-inner div every time there\"s a new carousel-item div? Instead of it containing all of the carousel-items in one overall div? Confirm by examining a conventional one post per item carousel. I still suspect the issue might be CSS related. If so, I\"d need a live link to the page with the problem in order to advise further about CSS. . Thanks once more for all your responses. The project I am working on is presently on localhost and not yet online. I will like you to do me little favour. Can you copy and re-edit it at your end as I don\"t really know how to handle the issue of carousel-inner div you are talking about I have changed if ( 2 == $x % 3) { line to this: post_count – == $x % 3 && ($query->post_count – 1)> Unless you\"re sure the carousel-inner is required for every carousel item, I recommend keeping a backup of the current version in case altering carousel-inner turns out to be the wrong call. Handle carousel-inner like this: have_posts() ) : == $x % 3 && ($query->post_count - 1)> I also moved the coverage of if ( $query->have_posts() ) :以包含最外层的carousel div。它不太可能没有post,但在这种情况下,我希望不存在任何与carousel相关的内容。 这是三个post的结构: .carousel.inner.item.container.thumbnail.caption.thumbnail.caption.thumbnail.caption.end container.end item.end inner.end carousel Do你认为每个邮递都应该有一个集装箱部门吗? 为什么您要使用两个不同的帐户来发布回复?首先,这让人困惑。此外,我们一般不允许人们在论坛中使用多个帐户。你需要停止使用其中一个。你想继续用哪一种? 这个帐户是您在这个.org网站上不需要的,还是可以完全放弃?我要么禁用它,要么改变它的角色,这样它就不能在论坛上发布

admin_action_{$_REQUEST[‘action’]}

do_action( "admin_action_{$_REQUEST[‘action’]}" )动作钩子::在发送“Action”请求变量时激发。Action Hook: Fires when an ‘action’ request variable is sent.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$_REQUEST['action']引用从GET或POST请求派生的操作。源码(Source)更新版本源码位置使用被使用2.6.0 wp-admin/admin.php:...

日期:2020-09-02 17:44:16 浏览:1159

admin_footer-{$GLOBALS[‘hook_suffix’]}

do_action( "admin_footer-{$GLOBALS[‘hook_suffix’]}", string $hook_suffix )操作挂钩:在默认页脚脚本之后打印脚本或数据。Action Hook: Print scripts or data after the default footer scripts.目录锚点:#说明#参数#源码说明(Description)钩子名的动态部分,$GLOBALS['hook_suffix']引用当前页的全局钩子后缀。参数(Parameters)参数类...

日期:2020-09-02 17:44:20 浏览:1060

customize_save_{$this->id_data[‘base’]}

do_action( "customize_save_{$this-&gt;id_data[‘base’]}", WP_Customize_Setting $this )动作钩子::在调用WP_Customize_Setting::save()方法时激发。Action Hook: Fires when the WP_Customize_Setting::save() method is called.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_data...

日期:2020-08-15 15:47:24 浏览:799

customize_value_{$this->id_data[‘base’]}

apply_filters( "customize_value_{$this-&gt;id_data[‘base’]}", mixed $default )过滤器::过滤未作为主题模式或选项处理的自定义设置值。Filter Hook: Filter a Customize setting value not handled as a theme_mod or option.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_date['base'],指的是设置...

日期:2020-08-15 15:47:24 浏览:885

get_comment_author_url

过滤钩子:过滤评论作者的URL。Filter Hook: Filters the comment author’s URL.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/comment-template.php:32610...

日期:2020-08-10 23:06:14 浏览:925

network_admin_edit_{$_GET[‘action’]}

do_action( "network_admin_edit_{$_GET[‘action’]}" )操作挂钩:启动请求的处理程序操作。Action Hook: Fires the requested handler action.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$u GET['action']引用请求的操作的名称。源码(Source)更新版本源码位置使用被使用3.1.0 wp-admin/network/edit.php:3600...

日期:2020-08-02 09:56:09 浏览:872

network_sites_updated_message_{$_GET[‘updated’]}

apply_filters( "network_sites_updated_message_{$_GET[‘updated’]}", string $msg )筛选器挂钩:在网络管理中筛选特定的非默认站点更新消息。Filter Hook: Filters a specific, non-default site-updated message in the Network admin.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分$_GET['updated']引用了非默认的...

日期:2020-08-02 09:56:03 浏览:854

pre_wp_is_site_initialized

过滤器::过滤在访问数据库之前是否初始化站点的检查。Filter Hook: Filters the check for whether a site is initialized before the database is accessed.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/ms-site.php:93910...

日期:2020-07-29 10:15:38 浏览:825

WordPress 的SEO 教学:如何在网站中加入关键字(Meta Keywords)与Meta 描述(Meta Description)?

你想在WordPress 中添加关键字和meta 描述吗?关键字和meta 描述使你能够提高网站的SEO。在本文中,我们将向你展示如何在WordPress 中正确添加关键字和meta 描述。为什么要在WordPress 中添加关键字和Meta 描述?关键字和说明让搜寻引擎更了解您的帖子和页面的内容。关键词是人们寻找您发布的内容时,可能会搜索的重要词语或片语。而Meta Description则是对你的页面和文章的简要描述。如果你想要了解更多关于中继标签的资讯,可以参考Google的说明。Meta 关键字和描...

日期:2020-10-03 21:18:25 浏览:1691

谷歌的SEO是什么

SEO (Search Engine Optimization)中文是搜寻引擎最佳化,意思近于「关键字自然排序」、「网站排名优化」。简言之,SEO是以搜索引擎(如Google、Bing)为曝光媒体的行销手法。例如搜寻「wordpress教学」,会看到本站的「WordPress教学:12个课程…」排行Google第一:关键字:wordpress教学、wordpress课程…若搜寻「网站架设」,则会看到另一个网页排名第1:关键字:网站架设、架站…以上两个网页,每月从搜寻引擎导入自然流量,达2万4千:每月「有机搜...

日期:2020-10-30 17:23:57 浏览:1298