{"id":20806699,"url":"https://github.com/fed/wordpress-widget-example","last_synced_at":"2026-05-01T20:31:33.776Z","repository":{"id":85048479,"uuid":"82500112","full_name":"fed/wordpress-widget-example","owner":"fed","description":"Wordpress Widget Example","archived":false,"fork":false,"pushed_at":"2018-02-09T17:52:51.000Z","size":175,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-12T23:39:39.809Z","etag":null,"topics":["react","wordpress","wordpress-widget"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/fed.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-20T00:27:43.000Z","updated_at":"2017-08-18T17:55:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"0851ab35-c0a7-49b3-a01d-320cccafa586","html_url":"https://github.com/fed/wordpress-widget-example","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/fed/wordpress-widget-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fwordpress-widget-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fwordpress-widget-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fwordpress-widget-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fwordpress-widget-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fed","download_url":"https://codeload.github.com/fed/wordpress-widget-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Fwordpress-widget-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["react","wordpress","wordpress-widget"],"created_at":"2024-11-17T19:24:26.371Z","updated_at":"2026-05-01T20:31:33.752Z","avatar_url":"https://github.com/fed.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wordpress React Widget Example\n\n## Prerequisites\n\n* Node.js (https://nodejs.org/)\n* Yarn (https://yarnpkg.com/)\n\n## Development Tasks\n\n| Command | Description |\n|---------|-------------|\n| `yarn install` | Fetch dependencies and build binaries for any of the modules |\n| `yarn start` | Run the app in development mode with live reload on `http://localhost:3000` |\n| `yarn build` | Generate an optimised, production-ready `build` folder |\n| `yarn test` | Run test suite in the interactive watch mode |\n\n## Deploying to Wordpress\n\nFirst run `yarn build` to generate the `build` folder along with the PHP configuration file required by Wordpress.\n\nCopy the contents of the `build` directory to `wp-content\\plugins\\your-widget`.\n\n## Activating the Widget\n\nWe now need to call `wp_widget_setup()` somewhere in our theme so that React has a root div to mount on.\n\nAlternatively, you can [add a new text widget](http://i.imgur.com/bUWJ4mc.png) (instead of calling the previous function). As a site administrator go to **Appearance \u003e Widgets** and drag a new \"Text\" widget to the top of the sidebar. The text content should be the mountpoint to the React app:\n\n```html\n\u003cdiv id=\"root\"\u003e\u003c/div\u003e\n```\n\nYou can make this *id* as specific as you want to avoid name clashes.\n\n## Project Structure\n\nThis project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).\n\nFor the project to build, these files must exist with exact filenames:\n\n* `public/index.html` is the page template;\n* `src/index.js` is the JavaScript entry point.\n\nYou can safely delete or rename any of the other files.\n\nOnly files inside `public` can be used from `public/index.html`.\n\n## Credits\n\nOriginal instructions for putting this plugin together can be found [here](http://myappincome.co.uk/how-to-make-a-react-js-wordpress-plugin/).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffed%2Fwordpress-widget-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffed%2Fwordpress-widget-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffed%2Fwordpress-widget-example/lists"}