{"id":24490367,"url":"https://github.com/armandphilippot/post-types-query-block","last_synced_at":"2025-04-13T23:07:37.845Z","repository":{"id":117573700,"uuid":"353434365","full_name":"ArmandPhilippot/post-types-query-block","owner":"ArmandPhilippot","description":"WordPress Plugin: display a list of posts based on (custom) post types as Gutenberg block.","archived":true,"fork":false,"pushed_at":"2024-09-15T10:17:26.000Z","size":5851,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T23:07:12.301Z","etag":null,"topics":["custom-post-types","gutenberg","gutenberg-blocks","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArmandPhilippot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-31T17:15:51.000Z","updated_at":"2025-04-09T15:24:38.000Z","dependencies_parsed_at":"2024-09-15T12:34:14.441Z","dependency_job_id":"c6e842dd-1233-48ba-8e16-8f35caf4d3fb","html_url":"https://github.com/ArmandPhilippot/post-types-query-block","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmandPhilippot%2Fpost-types-query-block","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmandPhilippot%2Fpost-types-query-block/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmandPhilippot%2Fpost-types-query-block/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmandPhilippot%2Fpost-types-query-block/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArmandPhilippot","download_url":"https://codeload.github.com/ArmandPhilippot/post-types-query-block/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794573,"owners_count":21162614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["custom-post-types","gutenberg","gutenberg-blocks","wordpress","wordpress-plugin"],"created_at":"2025-01-21T17:17:58.073Z","updated_at":"2025-04-13T23:07:37.799Z","avatar_url":"https://github.com/ArmandPhilippot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Post Types Query Block\n\n![License](https://img.shields.io/github/license/ArmandPhilippot/post-types-query-block?color=blue\u0026colorA=4c4f56\u0026label=License\u0026style=flat-square) ![Version](https://img.shields.io/github/package-json/v/ArmandPhilippot/post-types-query-block?color=blue\u0026colorA=4c4f56\u0026label=Version\u0026style=flat-square)\n\nPost Types Query Block is a WordPress plugin which add a new Gutenberg block. It allows you to query post types and offers different options to customize the display.\n\n## Introduction\n\nBy default, WordPress Gutenberg offers a Latest Posts block to display the recent posts but it does not include the custom post types or even the pages. So, I decide to create my own block with some settings to make it more reusable.\n\nWith Post Types Query Block, you can choose:\n\n-   one post type to display among \"_Posts_\", \"_Pages_\", \"_Media_\" and your custom post types.\n-   the number of posts to display.\n-   the order (\"_Title_\", \"_Publication date_\", \"_Update date_\", \"_Author_\").\n-   to filter by author, categories and tags.\n-   the information you want to display (dates, author, featured image, excerpt) with or without label and you can even rewrite the labels.\n-   the layout (list or grid) and some customization (no bullet lists or the number of grid columns).\n\n## Install\n\n### Composer install\n\nYou can use Composer to install this plugin as a dependency if you use custom installers:\n\n```\n{\n\"require\": {\n    \"armandphilippot/post-types-query-block\": \"dev-main\"\n}\n\"repositories\": [{\n    \"type\": \"git\",\n    \"url\": \"git@github.com:ArmandPhilippot/post-types-query.git\"\n}]\n```\n\nYou can specify the version by adding the corresponding tag: `dev-main#v1.0.0`.\n\n### Manual install\n\nYou can download this plugin on Github/Gitlab, then extract it in `/wp-content/plugins/` directory.\n\n## Usage\n\n1. Navigate to the \"_Plugins_\" dashboard page and click on \"_Activate_\".\n2. Choose \"_**Post Types Query Block**_\" inside Gutenberg Editor to add a new block.\n3. Configure the settings in the sidebar and choose the layout with the toolbar buttons.\n\n## Screenshots\n\nThese screenshots were taken with the \"_Twenty Twenty-One_\" theme of WordPress. I just made an adjustment to the meta since I use description list to display them and this theme use a `padding-left` with `dd`.\n\n| List Preview                                                          | Grid Preview                                                          |\n| --------------------------------------------------------------------- | --------------------------------------------------------------------- |\n| ![Admin List Preview](./src/images/ptqblock-admin-list-preview.jpg)   | ![Admin Grid Preview](./src/images/ptqblock-admin-grid-preview.jpg)   |\n| ![Public List Preview](./src/images/ptqblock-public-list-preview.jpg) | ![Public Grid Preview](./src/images/ptqblock-public-grid-preview.jpg) |\n\n## Translation\n\nCurrently, the block is available in English and in French.\n\nIf you want to provide another translation for the plugin, any pull request is welcome. Likewise, if some words are misused in English, I accept the corrections. It's not my native language.\n\nYou can use `wp-cli` to generate a new POT file (`wp i18n make-pot`) then to convert it in JSON (`wp i18n make-json`). However, it is not working for me. It does not allow me to extract JS strings with `make-pot` and the `make-json` command output multiple files... it is not convenient.\n\nSo, you can process like me with [Poedit](https://poedit.net/) and [po2json](https://github.com/mikeedwards/po2json) (the last one is already present in `package.json`).\n\n1. Copy `languages/PTQBlock.pot` and rename it to `languages/PTQBlock-{your-locale}.po`.\n2. Use the tool you want to provide translations inside the `.po` file.\n3. Convert the `.po` file to `.json` with `po2json` by using the `jed` format.\n\nExample:\n\n```bash\n./node_modules/.bin/po2json languages/PTQBlock-fr_FR.po languages/PTQBlock-fr_FR-ptqblock-i18n.json -f jed\n```\n\n## License\n\nThis project is open source and available under the [GPL v2 or later License](https://github.com/ArmandPhilippot/post-types-query-block/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmandphilippot%2Fpost-types-query-block","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmandphilippot%2Fpost-types-query-block","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmandphilippot%2Fpost-types-query-block/lists"}