我有一个 WordPress 网站,我在其中创建了多个帖子并将它们绑定到某个类别。
每个帖子有6个段落。
这是我想要实现的目标:
我创建了一个子 wordpress 主题文件,我在其中检索特定类别的所有帖子。
我想将每个帖子的第三段(最多 40 个字)显示为摘录。
任何人都可以帮助我实现这一目标?
任何帮助将不胜感激...
谢谢你
编辑:
其中一篇文章的内容:
<div id="grey">
<div id="title">
<h1 id="divtest">Title</h1>
</div>
<div id="divContentText1"><a href="#" class="button5"><span class="button5_hover"></span><strong>Back To Test Page</strong></a></div>
</div>
<div class="wrap" id="divPgInfo">
<div id="divInnerImgSliderWrap">[meteor_slideshow slideshow="test"]</div>
<div id="divImgTxtWrap">
<h4 class="innerSlideHd">Test Title</h4>
<p class="innerSlideText">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.</p>
<p class="innerSlideText">Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
<p class="innerSlideText">Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
<p class="innerSlideText">Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
<p class="innerSlideText">Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
</div>
<div class="divClr"></div>
</div>
<div class="divClr"></div>
现在我想展示句子“It is a long established....”中的内容
任何帮助将不胜感激....
真的很谢谢你...