https://github.com/murhafsousli/ng-wordpress-theme
Angular starter theme for WordPress
https://github.com/murhafsousli/ng-wordpress-theme
angular theme wordpress
Last synced: 12 months ago
JSON representation
Angular starter theme for WordPress
- Host: GitHub
- URL: https://github.com/murhafsousli/ng-wordpress-theme
- Owner: MurhafSousli
- Created: 2016-03-01T02:57:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-29T16:58:10.000Z (about 9 years ago)
- Last Synced: 2025-03-24T06:11:30.769Z (about 1 year ago)
- Topics: angular, theme, wordpress
- Language: PHP
- Homepage:
- Size: 378 KB
- Stars: 17
- Watchers: 7
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ng-wordpress-theme
Angular starter theme for wordpress
Advantages:
- SEO friendly
- Angular for frontend, WordPress for backend
This is an old [demo](http://ng2wordpress-murhaf.rhcloud.com) but things have been changed now
# This repo is still an expierment for integrating angular app in a wordpress theme. contributions are extremely welcome :)
#### Requirement:
- local WordPress server. (You can get one from [here](https://bitnami.com/stack/wordpress))
#### Quick start
- Download this repo into WP theme folder
- Navigate into the new theme and `npm install`
- `ng build` to get the `dist` directory
- Open your browser and go to wordpress server, e.g.: `http://localhost/wordpress`
[](https://postimg.org/image/pn4zprxzt/)
##Ideas for the theme
- `ngrx/store` for app state
```
{
menu: [],
categories: [],
routes:[
],
config: {
thumbnail_size,
featured_size,
posts_per_page,
theme_class
}
}
```
This state is initialized from **function.php** using `wp_localize_script` function, so it can be accessed later in angular using a service
##TODOs:
- Dynamic angular routes:
This can be a great feature to allow users to specify angular routes from there theme config at WP setting page
- Use [Angular WordPress Module](https://github.com/MurhafSousli/ng2-wp-api) to make things requests easy.