<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>postget Archives - Codeplaners</title>
	<atom:link href="https://codeplaners.com/tag/postget/feed/" rel="self" type="application/rss+xml" />
	<link>https://codeplaners.com/tag/postget/</link>
	<description>Code Solution</description>
	<lastBuildDate>Mon, 15 Jul 2024 01:07:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>

<image>
	<url>https://codeplaners.com/wp-content/uploads/2020/09/cropped-favicon-social-32x32.png</url>
	<title>postget Archives - Codeplaners</title>
	<link>https://codeplaners.com/tag/postget/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How To Get post_type Data in WordPress</title>
		<link>https://codeplaners.com/how-to-get-post_type-data-in-wordpress/</link>
					<comments>https://codeplaners.com/how-to-get-post_type-data-in-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 15 Jul 2024 00:49:20 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[postget]]></category>
		<category><![CDATA[posttypedataget]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1732</guid>

					<description><![CDATA[<p>Hi Dev, Today, we will show you how to get post_type data in wordpress. This article will give you simple example of how to get post_type data in wordpress. Let&#8217;s discuss how to get post_type data in wordpress. In this article, we will implement a how to get post_type data in wordpress. So let’s follow &#8230; <a href="https://codeplaners.com/how-to-get-post_type-data-in-wordpress/" class="more-link">Continue reading<span class="screen-reader-text"> "How To Get post_type Data in WordPress"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-get-post_type-data-in-wordpress/">How To Get post_type Data in WordPress</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi Dev,</p>
<p>Today, we will show you how to get post_type data in wordpress. This article will give you simple example of how to get post_type data in wordpress. Let&#8217;s discuss how to get post_type data in wordpress. In this article, we will implement a how to get post_type data in wordpress.</p>
<p>So let’s follow few step to create example of how to get post_type data in wordpress.</p>
<h3 class="step_code">Step 1: All Post Data Get</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php $loop = new WP_Query( array ( 'post_type' =&gt; 'post', 'orderby' =&gt; 'post_id', 'posts_per_page' =&gt;'10') ); ?&gt;

&lt;?php while( $loop-&gt;have_posts() ): $loop-&gt;the_post(); ?&gt;

&lt;?php $url = wp_get_attachment_url( get_post_thumbnail_id($post-&gt;ID), 'full' ); ?&gt;

  &lt;article class=&quot;article_codeplaners&quot;&gt;
    &lt;div class=&quot;code_img&quot;&gt;
        &lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $url ?&gt;&quot; alt=&quot;&quot;&gt;&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class=&quot;code_cont&quot;&gt;
        &lt;h3&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
        &lt;span&gt;&lt;/span&gt;
    &lt;/div&gt;
&lt;/article&gt;   

&lt;?php endwhile; wp_reset_query();?&gt;
</pre>
<h3 class="step_code">Step 2: Category Wise Post Get</h3>
<pre class="brush: php; title: ; notranslate">
 &lt;?php $loop = new WP_Query( array ( 'post_type' =&gt; 'post', 'orderby' =&gt; 'post_id', 'cat' =&gt;'2', 'posts_per_page' =&gt;'10') ); ?&gt;

    &lt;?php while( $loop-&gt;have_posts() ): $loop-&gt;the_post(); ?&gt;

    &lt;?php $url = wp_get_attachment_url( get_post_thumbnail_id($post-&gt;ID), 'full' ); ?&gt;

    &lt;article class=&quot;article_codeplaners&quot;&gt;
    &lt;div class=&quot;code_img&quot;&gt;
        &lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $url ?&gt;&quot; alt=&quot;&quot;&gt;&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class=&quot;code_cont&quot;&gt;
        &lt;h3&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
        &lt;span&gt;&lt;/span&gt;
    &lt;/div&gt;
    &lt;/article&gt;   

    &lt;?php endwhile; wp_reset_query();?&gt;
</pre>
<h3 class="step_code">Step 3: offset Wise Post Get</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php $loop = new WP_Query( array ( 'post_type' =&gt; 'post', 'orderby' =&gt; 'post_id',  'offset' =&gt; '2','posts_per_page' =&gt;'10') ); ?&gt;
                    
    &lt;?php while( $loop-&gt;have_posts() ): $loop-&gt;the_post(); ?&gt;

    &lt;?php $url = wp_get_attachment_url( get_post_thumbnail_id($post-&gt;ID), 'full' ); ?&gt;

    &lt;article class=&quot;article_codeplaners&quot;&gt;
        &lt;div class=&quot;code_img&quot;&gt;
            &lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $url ?&gt;&quot; alt=&quot;&quot;&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class=&quot;code_cont&quot;&gt;
            &lt;h3&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
            &lt;span&gt;&lt;/span&gt;
        &lt;/div&gt;
    &lt;/article&gt;   

&lt;?php endwhile; wp_reset_query();?&gt;
</pre>
<p><strong>I hope it will assist you…</strong></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-get-post_type-data-in-wordpress/">How To Get post_type Data in WordPress</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/how-to-get-post_type-data-in-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
