{"id":12395,"date":"2011-03-03T23:18:14","date_gmt":"2011-03-03T23:18:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/postmash-custom\/"},"modified":"2011-03-30T22:50:51","modified_gmt":"2011-03-30T22:50:51","slug":"postmash-custom","status":"closed","type":"plugin","link":"https:\/\/sa.wordpress.org\/plugins\/postmash-custom\/","author":471359,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.3","stable_tag":"1.0.3","tested":"3.1.4","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"PostMash Custom","header_author":"Torstein Opperud","header_description":"","assets_banners_color":"","last_updated":"2011-03-30 22:50:51","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/opperud.com\/postmash_custom","header_author_uri":"http:\/\/opperud.com","rating":0,"author_block_rating":0,"active_installs":400,"downloads":23904,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0.1":"<ul>\n<li>Fixed permission errors when filtering\n\n<ul>\n<li>Fixed typos and urls<\/li>\n<\/ul><\/li>\n<\/ul>","1.0.2":"<ul>\n<li>corrected some info<\/li>\n<\/ul>","1.0.3":"<ul>\n<li>refixed permission errors when filtering\n\n<ul>\n<li>fixed timeout error when updating\/saving<\/li>\n<\/ul><\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.0.2","1.0.3"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1566869","resolution":"2","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1566869","resolution":"3","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566869","resolution":"1","location":"plugin"}},"screenshots":{"1":"From the filtering screen.","2":"Change order by dragging posts up\/down."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[83,221,3938,37187,32499],"plugin_category":[59],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-12395","plugin","type-plugin","status-closed","hentry","plugin_tags-admin","plugin_tags-ajax","plugin_tags-drag-and-drop","plugin_tags-order-posts","plugin_tags-re-order","plugin_category-utilities-and-tools","plugin_committers-torsteino"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/postmash-custom.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/postmash-custom\/trunk\/screenshot-1.png?rev=1566869","caption":"From the filtering screen."},{"src":"https:\/\/ps.w.org\/postmash-custom\/trunk\/screenshot-2.png?rev=1566869","caption":"Change order by dragging posts up\/down."},{"src":"https:\/\/ps.w.org\/postmash-custom\/trunk\/screenshot-3.png?rev=1566869","caption":""}],"raw_content":"<!--section=description-->\n<p>Posts are usually listed in reverse chronological order as they are often used for posting regular time-orientated content.<\/p>\n\n<p>PostMash Custom lets you customise the order your posts are listed in using a simple Ajax drag-and-drop administrative interface, both regular posts and custom post types, with filtering for both standard taxonomy and custom taxonomies. Plus it gives quick access to toggle posts between draft and published states. Particularly useful if you're using WordPress as a CMS.<\/p>\n\n<p><a href=\"http:\/\/opperud.com\/postmash_custom\/\">Plugin home page<\/a><\/p>\n\n<h3>Credits<\/h3>\n\n<p>This version: Torstein Opperud, http:\/opperud.com<\/p>\n\n<p>The original postMash plugin and author: http:\/\/joelstarnes.co.uk\/postMash\/, \npostMash (filtered): http:\/\/postmashfiltered.wordpress.com\/2009\/06\/19\/post-mash-filtered\/<\/p>\n\n<h3>Localization<\/h3>\n\n<p>Currently only available in english.<\/p>\n\n<!--section=installation-->\n<p>Upload to wp-content\/plugins\/ and activate.<\/p>\n\n<p>To make use of this chosen order you will need to modify your template code:\nOpen wp-content\/themes\/your-theme-name\/index.php and find the beginning of \u2018the loop\u2019. Which will start: <code>if(have_posts())<\/code>. Then add the following code directly before this:<\/p>\n\n<pre><code>&lt;?php  \n    $wp_query-&gt;set('orderby', 'menu_order');  \n    $wp_query-&gt;set('order', 'ASC');  \n    $wp_query-&gt;get_posts();  \n?&gt;\n<\/code><\/pre>\n\n<p>This just tells WP to get the posts ordered according to their \u2018menu_order\u2019 position. Therefore you can get the posts ordered anytime you use a function such as get_posts simply by giving it the required arguments:<\/p>\n\n<pre><code>&lt;?php get_posts('orderby=menu_order&amp;order=ASC'); ?&gt;\n<\/code><\/pre>\n\n<p>Checkout the get_posts() function in the wordpress codex for more info.\nNote that it says menu_order is only useful for pages, posts have a menu_order position too, it just isn\u2019t used. postMash provides you with an interface so that you can use it.<\/p>\n\n<h4>Instructions for Twenty Ten<\/h4>\n\n<p>Things may seem a bit different in Twenty Ten, since the loop has been moved from the individual templatefiles into loop.php, but actually it still works almost exactly the same. Below is the entire code you need for Twenty Tens index.php:<\/p>\n\n<pre><code>&lt;?php\n\/**\n * The main template file.\n *\n * This is the most generic template file in a WordPress theme\n * and one of the two required files for a theme (the other being style.css).\n * It is used to display a page when nothing more specific matches a query.\n * E.g., it puts together the home page when no home.php file exists.\n * Learn more: http:\/\/codex.wordpress.org\/Template_Hierarchy\n *\n * @package WordPress\n * @subpackage Twenty_Ten\n * @since Twenty Ten 1.0\n *\/\n\nget_header(); ?&gt;\n\n        &lt;div id=\"container\"&gt;\n            &lt;div id=\"content\" role=\"main\"&gt;\n&lt;?php  \n    $wp_query-&gt;set('orderby', 'menu_order');  \n    $wp_query-&gt;set('order', 'ASC');  \n    $wp_query-&gt;get_posts();  \n?&gt;\n            &lt;?php\n            \/* Run the loop to output the posts.\n             * If you want to overload this in a child theme then include a file\n             * called loop-index.php and that will be used instead.\n             *\/\n             get_template_part( 'loop', 'index' );\n            ?&gt;\n            &lt;\/div&gt;&lt;!-- #content --&gt;\n        &lt;\/div&gt;&lt;!-- #container --&gt;\n\n&lt;?php get_sidebar(); ?&gt;\n&lt;?php get_footer(); ?&gt;\n<\/code><\/pre>\n\n<p>NEXT POST AND PREVIOUS POST LINKS<\/p>\n\n<p>ALSO You can now use the 'Next Post' and 'Previous Post' calls in your template file 'single.php', as usual, but rather than calling items by date, it will call items using the same order as set in postMash,  using the following modified commands in place of the regular tags<\/p>\n\n<pre><code>ORIGINAL TAGS\n\n    next_post_link(); \n    previous_post_link();\n\nMODIFIED TAGS\n\n    next_post_link_menu(); \n    previous_post_link_menu();\n<\/code><\/pre>\n\n<p>(Please note that, by default, 'In Same Category' is set to TRUE. You will need to edit this if you wish to disable it. All other variables passed to the function should work as normal)<\/p>\n\n<p>OPTIONAL ADMIN INSTALLATION<\/p>\n\n<p>If you wish to view the posts in the Wordpress admin 'Edit Posts' panel in the same order as you have set them postMash (rather than the default 'Date Published' or 'Date Modified'), you can modify wp-admin\/includes\/post.php, on line 784 as follows;<\/p>\n\n<pre><code>ORIGINAL\n\n    if ( isset($q['post_status']) &amp;&amp; 'pending' === $q['post_status'] ) {\n        $order = 'ASC';\n        $orderby = 'modified';\n    } elseif ( isset($q['post_status']) &amp;&amp; 'draft' === $q['post_status'] ) {\n        $order = 'DESC';\n        $orderby = 'modified';\n    } else {\n        $order = 'DESC';\n        $orderby = 'date';\n    }\n\n\nMODIFIED\n\n    if ( isset($q['post_status']) &amp;&amp; 'pending' === $q['post_status'] ) {\n        $order = 'ASC';\n        $orderby = 'menu_order';\n    } elseif ( isset($q['post_status']) &amp;&amp; 'draft' === $q['post_status'] ) {\n        $order = 'ASC';\n        $orderby = 'menu_order';\n    } else {\n        $order = 'ASC';\n        $orderby = 'menu_order';\n    }\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt>None of it's working<\/dt>\n<dd><p>The most likely cause is that you have another plugin which has included an incompatible javascript library onto the postMash admin page.<\/p>\n\n<p>Try opening up your WP admin and browse to your postMash page, then take a look at the page source. Check if the prototype or scriptaculous scripts are included in the header. If so then the next step is to track down the offending plugin, which you can do by disabling each of your plugins in turn and checking when the scripts are no longer included.<\/p><\/dd>\n<dt>Do I need any special code in my template<\/dt>\n<dd><p>Yes, by default posts are shown in reverse chronological order, to show the posts in the order you set in postMash you will need to use different code to display your posts. Look in the install section for an example.<\/p><\/dd>\n<dt>Which browsers are supported<\/dt>\n<dd><p>Any good up-to-date browser should work fine. Tested in Firefox, IE7, Safari and Opera.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial Release<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fixed \"not permission\"-errors when filtering, added screenshots, fixed some typos &amp; such.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>corrected some info<\/li>\n<\/ul>","raw_excerpt":"Customize display order of posts by a simple drag-and-drop Ajax interface, now with support for custom post types and custom taxonomies.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/12395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=12395"}],"author":[{"embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/torsteino"}],"wp:attachment":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=12395"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=12395"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=12395"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=12395"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=12395"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=12395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}