{"id":8933,"date":"2015-01-01T17:58:28","date_gmt":"2015-01-01T22:58:28","guid":{"rendered":"http:\/\/www.jbaker.info\/?p=3056"},"modified":"2015-01-01T17:58:28","modified_gmt":"2015-01-01T22:58:28","slug":"take-total-control-of-displaying-posts-with-the-xpanda-plugin-2","status":"publish","type":"post","link":"https:\/\/www.jbaker.info\/demo05\/take-total-control-of-displaying-posts-with-the-xpanda-plugin-2\/","title":{"rendered":"Take Total Control of Displaying Posts With the xPanda Plugin"},"content":{"rendered":"<div class=\"xpc_one_half\">\n<div class=\"dropcap\">H<\/div>ere&#8217;s another way to free yourself from your theme. Many WordPress themes include special features or shortcodes to display lists of your posts.<\/p>\n<p>All of these have some (usually very nice) options. Some are extremely useful. But if you want to change your theme, you lose the ability to use this feature. Any shortcodes or options that are included with the theme go away if you change to a different one. <\/p>\n<p>It makes much more sense to use plugins to provide these special features and options. Then you can change your theme any time you like and not give up the extra features that your plugins provide.<\/p>\n<h2>xPanda Plugin<\/h2>\n<p>One of the features that I wanted to have in my xPanda plugin was the ability to show &#8216;magazine&#8217; style experts of posts in various ways. There are some nice plugins available for this. <\/p>\n<p>For example, the WP Category Posts List Plugin:\n<a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-category-posts-list\/\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.jbaker.info\/wp-content\/uploads\/ScreenClip-300x202.jpg\" alt=\"WP Category Posts List Plugin Screenshot\" title=\"WP Category Posts List Plugin\" width=\"300\" height=\"202\" class=\"alignleft size-medium wp-image-3068 xpfluid\" srcset=\"https:\/\/www.jbaker.info\/demo05\/wp-content\/uploads\/ScreenClip-300x202.jpg 300w, https:\/\/www.jbaker.info\/demo05\/wp-content\/uploads\/ScreenClip.jpg 538w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I&#8217;ve used this plugin and it has many nice features. In fact, it was so nice it made me want to have more options.<\/p>\n<p><\/div>\n<div class=\"xpc_one_half xpc_last\"><\/p>\n<h3>Arranging Your Site By Categories<\/h3>\n<p>Many bloggers use categories to group their posts. This is an excellent way to set up a web site. And when using WordPress it provides built in structure. However, in order for users or search engines to be able to find all your posts, there must be a page or listing that allows them to see all the posts for each category.<\/p>\n<p>The trouble with most plugins is that they are set to display only a certain number of posts. Usually this is displayed in the sidebar. This use of a limited number is done because you don&#8217;t want to overrun your sidebar with a huge listing of all your posts for that category. <\/p>\n<h3>Where would you show your ads or affiliate links?<\/h3>\n<p>If you overrun your sidebar with a big list, you can&#8217;t show other content above the fold. <\/p>\n<p>A much better solution would be a way to show perhaps the top five related posts for this category. Then a different section. Then the next 5 (or so) posts. Then some other content. Then the balance of the posts that apply to this category.<\/p>\n<p>It might look something like the following:\n<\/div><div class=\"xp_clear\"><\/div>\n<a href=\"http:\/\/www.jbaker.info\/wp-content\/uploads\/layout.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.jbaker.info\/wp-content\/uploads\/layout.jpg\" alt=\"Layout Example Screenshot\" title=\"Layout Example\" width=\"699\" height=\"845\" class=\"aligncenter size-full wp-image-3074 xpfluid\" srcset=\"https:\/\/www.jbaker.info\/demo05\/wp-content\/uploads\/layout.jpg 699w, https:\/\/www.jbaker.info\/demo05\/wp-content\/uploads\/layout-248x300.jpg 248w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/a>\n<p>Therefore I have included the <strong>Super-Get-Posts Widget<\/strong> in the xPanda plugin. Here is how you would use this get posts shortcode to display the first 5 posts in a single category using the ID of the category:<\/p>\n<div class=\"xpdiv\" style=\"padding: 10px 10px 15px 10px; background: #F0E8C6; font-family: 'Courier New', Courier, monospace; border: solid 1px #888\">\n[[xp_get_posts cat=&#8217;44&#8217; orderby=&#8217;modified&#8217; order=&#8217;DESC&#8217; num_of_posts=&#8217;5&#8242; start_at=&#8217;1&#8242;]]\n<\/div>\n<p>Then this is how you would could display the next 5 posts at a different place in the sidebar or in your post:<\/p>\n<div class=\"xpdiv\" style=\"padding: 10px 10px 15px 10px; background: #F0E8C6; font-family: 'Courier New', Courier, monospace; border: solid 1px #888\">\n[[xp_get_posts cat=&#8217;44&#8217; orderby=&#8217;modified&#8217; order=&#8217;DESC&#8217; num_of_posts=&#8217;5&#8242; start_at=&#8217;6&#8242;]]\n<\/div>\n<p>[clear]<\/p>\n<h3>More Information<\/h3>\n<p>Here&#8217;s a link to the <a href=\"http:\/\/www.jbaker.info\/super-get-posts-documentation-and-options\/\">Super-Get-Posts documentation page<\/a>  where you can find more information about the many options and uses that are available to you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a better way to show listings of your posts. Show css styled lists by category, tag, etc. Specify the number of posts or split the display to display posts in sections. This powerful plugin gives you complete control.<\/p>\n","protected":false},"author":1,"featured_media":3065,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,13],"tags":[],"class_list":["post-8933","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unvetted","category-plugins"],"_links":{"self":[{"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/posts\/8933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/comments?post=8933"}],"version-history":[{"count":0,"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/posts\/8933\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/media\/3065"}],"wp:attachment":[{"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/media?parent=8933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/categories?post=8933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jbaker.info\/demo05\/wp-json\/wp\/v2\/tags?post=8933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}