wp-post-item

<xsl:include href="../plugins/tenandtwo-xslt-processor/xsl/wp.xsl" />

<xsl:call-template name="wp-post-item">
    <xsl:with-param name="post" select="$post" />
    <xsl:with-param name="type" select="$type" />
</xsl:call-template>

TEST 1 :
wp-post-item :
– post = 2

result :

  <RESULT template="wp-post-item" page="sample-page" id="2" count="28">
    <ID>2</ID>
    <post_author>1</post_author>
    <post_date>2023-10-04 17:13:19</post_date>
    <post_date_gmt>2023-10-04 17:13:19</post_date_gmt>
    <post_content><div class="page-content"><p>This is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:</p> <blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"> <p>Hi there! I’m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like coladas. (And gettin’ caught in the rain.)</p> </blockquote> <p>…or something like this:</p> <blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"> <p>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.</p> </blockquote> <p>As a new WordPress user, you should go to <a href="http://www.tenandtwo.io/wp-admin/">your dashboard</a> to delete this page and create new pages for your content. Have fun!</p> <div class="wp-block-media-text is-stacked-on-mobile"><figure class="wp-block-media-text__media"><a href="https://plugins.tenandtwo.com/wp-content/uploads/2024/06/2023_23rd-scaled.jpeg"><img fetchpriority="high" decoding="async" width="1024" height="779" src="http://plugins.tenandtwo.com/wp-content/uploads/2024/06/2023_23rd-1024x779.jpeg" alt="Wegman Mosaic" class="wp-image-3322 size-full" srcset="https://plugins.tenandtwo.com/wp-content/uploads/2024/06/2023_23rd-1024x779.jpeg 1024w, https://plugins.tenandtwo.com/wp-content/uploads/2024/06/2023_23rd-300x228.jpeg 300w, https://plugins.tenandtwo.com/wp-content/uploads/2024/06/2023_23rd-150x114.jpeg 150w, https://plugins.tenandtwo.com/wp-content/uploads/2024/06/2023_23rd-768x584.jpeg 768w, https://plugins.tenandtwo.com/wp-content/uploads/2024/06/2023_23rd-1536x1168.jpeg 1536w, https://plugins.tenandtwo.com/wp-content/uploads/2024/06/2023_23rd-2048x1557.jpeg 2048w, https://plugins.tenandtwo.com/wp-content/uploads/2024/06/2023_23rd-1006x765.jpeg 1006w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure><div class="wp-block-media-text__content"> <p>Hello Media & Text</p> </div></div></div></post_content>
    <post_title>Sample Page</post_title>
    <post_excerpt>This is an example page. It’s different from a blog post because it will stay in one place and will [&hellip;]</post_excerpt>
    <post_status>private</post_status>
    <comment_status>closed</comment_status>
    <ping_status>closed</ping_status>
    <post_password/>
    <post_name>sample-page</post_name>
    <to_ping/>
    <pinged/>
    <post_modified>2024-06-19 18:16:34</post_modified>
    <post_modified_gmt>2024-06-19 18:16:34</post_modified_gmt>
    <post_content_filtered/>
    <post_parent>1665</post_parent>
    <guid>http://www.tenandtwo.io/?page_id=2</guid>
    <menu_order>0</menu_order>
    <post_type>page</post_type>
    <post_mime_type/>
    <comment_count>0</comment_count>
    <filter>raw</filter>
    <ancestors>
      <key_0>1665</key_0>
    </ancestors>
    <page_template>page-sidebar-right</page_template>
    <post_category/>
    <tags_input/>
  </RESULT>


TEST 2 :
wp-post-item :
– post = sample-xml
– type = xslt_xml

result :

  <RESULT template="wp-post-item" xml="sample-xml" id="876" count="28">
    <ID>876</ID>
    <post_author>1</post_author>
    <post_date>2023-10-24 17:55:26</post_date>
    <post_date_gmt>2023-10-24 17:55:26</post_date_gmt>
    <post_content><?xml version='1.0' encoding='utf-8'?> <!DOCTYPE sample SYSTEM "/srv/xsltproc.tenandtwo.com/htdocs/wp-content/plugins/tenandtwo-xslt-processor/xsl/sample.dtd"><sample> <comment>This is a test WordPress XML Document item</comment> <list title="My List"> <item value="1">One</item> <item value="2">Two</item> <item value="3">Three</item> <item value="4">Four</item> </list> <dates> <date>2022-12-02 12:12:12</date> <date>2023-03-03 13:13:13</date> </dates> </sample></post_content>
    <post_title>sample-xml</post_title>
    <post_excerpt><sample> <comment>This is a test WordPress XML Document item</comment> <list title=&quot;My List&quot;> <item value=&quot;1&quot;>One</item> <item value=&quot;2&hellip;</post_excerpt>
    <post_status>publish</post_status>
    <comment_status>closed</comment_status>
    <ping_status>closed</ping_status>
    <post_password/>
    <post_name>sample-xml</post_name>
    <to_ping/>
    <pinged/>
    <post_modified>2024-01-10 17:35:26</post_modified>
    <post_modified_gmt>2024-01-10 17:35:26</post_modified_gmt>
    <post_content_filtered/>
    <post_parent>0</post_parent>
    <guid>https://www.tenandtwo.io/?post_type=xml&p=876</guid>
    <menu_order>0</menu_order>
    <post_type>xslt_xml</post_type>
    <post_mime_type/>
    <comment_count>0</comment_count>
    <filter>raw</filter>
    <ancestors/>
    <page_template>default</page_template>
    <post_category/>
    <tags_input/>
  </RESULT>