{"id":38762,"date":"2015-09-07T16:39:14","date_gmt":"2015-09-07T16:39:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/ttt-loadmore\/"},"modified":"2015-09-14T09:34:04","modified_gmt":"2015-09-14T09:34:04","slug":"ttt-loadmore","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/ttt-loadmore\/","author":8723065,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.1","stable_tag":"1.1.1","tested":"4.3.34","requires":"3.7","requires_php":"","requires_plugins":"","header_name":"TTT LoadMore","header_author":"33 Themes UG i.Gr.","header_description":"","assets_banners_color":"ccc18e","last_updated":"2015-09-14 09:34:04","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.33themes.com","header_author_uri":"http:\/\/www.33themes.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1388,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1240547","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1240547","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":"1240547","resolution":"1544x500","location":"assets"},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1240547","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.1.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[61827,61826,900,39726,61828],"plugin_category":[],"plugin_contributors":[85156,85152,85153,85154,85155],"plugin_business_model":[],"class_list":["post-38762","plugin","type-plugin","status-publish","hentry","plugin_tags-core-pagination","plugin_tags-loadmore","plugin_tags-pagination","plugin_tags-posts-pagination","plugin_tags-vertical-pagination","plugin_contributors-11bits","plugin_contributors-33themes","plugin_contributors-gabrielperezs","plugin_contributors-lonchbox","plugin_contributors-tomasog","plugin_committers-gabrielperezs","plugin_committers-lonchbox"],"banners":{"banner":"https:\/\/ps.w.org\/ttt-loadmore\/assets\/banner-772x250.png?rev=1240547","banner_2x":"https:\/\/ps.w.org\/ttt-loadmore\/assets\/banner-1544x500.png?rev=1240547","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/ttt-loadmore\/assets\/icon-128x128.png?rev=1240547","icon_2x":"https:\/\/ps.w.org\/ttt-loadmore\/assets\/icon-256x256.png?rev=1240547","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>WordPress plugin to load more event with your own template.<\/p>\n\n<p>For code contributions please go to https:\/\/github.com\/33themes\/ttt-loadmore<\/p>\n\n<h3>How to use it<\/h3>\n\n<p><em>This is the base html:<\/em><\/p>\n\n<pre><code>&lt;a href=\"#\" data-tttloadmore-do=\"archiveposts\" data-tttloadmore-to=\"#main\" data-tttloadmore-args=\"category:php;\"&gt;\n    Load more content\n&lt;\/a&gt;\n<\/code><\/pre>\n\n<ul>\n<li>data-tttloadmore-do* is the action to load more content<\/li>\n<li>data-tttloadmore-to* is where the script put the content after load more posts (the result of the \"do\" action)<\/li>\n<li>data-tttloadmore-args* contain all the arguments you want to send to the \"do\" action<\/li>\n<\/ul>\n\n<p><em>Then, you have to create an action with the same name of the data-tttloadmore-do<\/em><\/p>\n\n<pre><code>&lt;?php\nfunction loadmore_archiveposts( $page, $args = false ){\n\n    $archiveposts = array(\n        'post_type' =&gt; 'post',\n        'post_status' =&gt; 'publish',\n        'order' =&gt; 'DESC',\n        'orderby' =&gt; 'date',\n        'paged' =&gt; $page,\n        'ignore_sticky_posts' =&gt; 1,\n        'category_name' =&gt; $args['category'],\n    );\n    $archiveposts_query = new WP_Query($archiveposts);\n    ?&gt;\n\n    &lt;?php if ($archiveposts_query-&gt;have_posts()) : ?&gt;\n        &lt;?php while ($archiveposts_query-&gt;have_posts()) : $archiveposts_query-&gt;the_post(); ?&gt;\n                &lt;?php get_template_part( 'partials\/content', 'content' ); ?&gt;\n        &lt;?php wp_reset_postdata();?&gt;\n        &lt;?php endwhile; ?&gt;\n    &lt;?php endif;?&gt;\n\n    &lt;?\n}\nadd_action('ttt_loadmore_archiveposts','loadmore_archiveposts', 1, 2);\n?&gt;\n<\/code><\/pre>\n\n<!--section=installation-->\n<p>This section describes how to install the plugin and get it working.<\/p>\n\n<ol>\n<li>Upload <code>ttt-loadmore<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h3>1.1<\/h3>\n\n<p>Remove assets from the main file<\/p>\n\n<h3>1.0<\/h3>\n\n<p>First version<\/p>","raw_excerpt":"WordPress plugin to load more event with your own template.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/38762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=38762"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/gabrielperezs"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=38762"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=38762"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=38762"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=38762"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=38762"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=38762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}