{"id":23968638,"url":"https://github.com/vutran/wp-grid-sorter","last_synced_at":"2026-05-13T01:33:06.927Z","repository":{"id":15743030,"uuid":"18481652","full_name":"vutran/wp-grid-sorter","owner":"vutran","description":"WordPress plugin to sort your posts by custom sort keys","archived":false,"fork":false,"pushed_at":"2014-06-01T05:11:28.000Z","size":292,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T14:27:25.130Z","etag":null,"topics":["grid","php","plugin","wordpress","wp"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vutran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-06T02:54:23.000Z","updated_at":"2014-06-01T05:11:29.000Z","dependencies_parsed_at":"2022-08-25T11:50:19.058Z","dependency_job_id":null,"html_url":"https://github.com/vutran/wp-grid-sorter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vutran/wp-grid-sorter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwp-grid-sorter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwp-grid-sorter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwp-grid-sorter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwp-grid-sorter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vutran","download_url":"https://codeload.github.com/vutran/wp-grid-sorter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwp-grid-sorter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32963930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"ssl_error","status_checked_at":"2026-05-12T23:30:18.191Z","response_time":102,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grid","php","plugin","wordpress","wp"],"created_at":"2025-01-07T00:15:33.886Z","updated_at":"2026-05-13T01:33:06.909Z","avatar_url":"https://github.com/vutran.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Grid Sorter\n\nSort your WordPress posts with custom sort keys\n\n# Functions\n\n`wp_grid_sorter_register_sort_key($sortKey, $args)`\n\n## Arguments\n\n`name` Specify the name to display in the CMS\n\n`post_type` Specify the post type for this key\n\n# Register a custom sort key by post type\n\n    \u003c?php\n    add_action('init', 'site_register_wp_grid_sorters');\n    function site_register_wp_grid_sorters()\n    {\n        if (function_exists('wp_grid_sorter_register_sort_key')) {\n            $args = array(\n                'name' =\u003e 'Sort All Posts',\n                'post_type' =\u003e 'post'\n            );\n            wp_grid_sorter_register_sort_key('sort_all_posts', $args);   \n        }\n    }\n    ?\u003e\n\n# Register a custom sort key by custom WP_Query\n    \u003c?php\n    $args = array(\n        'name' =\u003e 'Home Page Featured',\n        'query' =\u003e new WP_Query(array(\n            'post_type' =\u003e 'post',\n            'meta_query' =\u003e array(\n                array(\n                    'key' =\u003e 'featured',\n                    'value' =\u003e 1\n                )\n            )\n        ))\n    );\n    wp_grid_sorter_register_sort_key('home_page_featured', $args);\n    ?\u003e\n\n# Query posts and order by your custom sort key\n\nThis is automatically hooked into [`WP_Query`](http://codex.wordpress.org/Class_Reference/WP_Query). Please refer to the documentation for [order by a meta key](http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters) in the WordPress Codex.\n\n## Example:\n\n    \u003c?php\n    $args = array(\n        'post_type' =\u003e 'post',\n        'order' =\u003e 'ASC',\n        'orderby' =\u003e 'meta_value_num',\n        'meta_key' =\u003e 'home_page_featured'\n    );\n    $myCustomQuery = new WP_Query($args);\n    ?\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvutran%2Fwp-grid-sorter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvutran%2Fwp-grid-sorter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvutran%2Fwp-grid-sorter/lists"}