Coder Social home page Coder Social logo

jaydeepjivani / angular2-wp-theme Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stuartwk/ng-wp-theme

0.0 1.0 0.0 16 KB

Demo Angular 2 WordPress Theme for http://doppiaeast.com

TypeScript 77.57% PHP 0.61% JavaScript 14.76% HTML 5.63% CSS 1.44%

angular2-wp-theme's Introduction

WPNG2

A WordPress theme that runs off of an Angular 2 app. Built for the tutorial http://doppiaeast.com/article/angular-2-wordpress-theme-setup/.

To use this as a theme, you must have the WP REST API version 2 plugin installed.

First, run npm install.

Inside of src/index.html, you'll need to change the base tag. <base href="/wp-content/themes/{YOUR_DIRECTORY}/dist/">. Change it to whatever you've named your theme directory on the server.

Inside of src/app/posts, open posts.service.ts. On the line where it says private postsUrl = "http://{YOUR_SITE_HERE}.com/wp-json/wp/v2/";, just place in your site name.

After you've done that, run ng build from your command line. This will output a dist folder. Upload index.php, styles.css, functions.php, and the dist folder to your theme directory on your server. You should be good to go!

This project will play nice with the Angular CLI.

angular2-wp-theme's People

Contributors

stuartwk avatar angular-cli avatar hubsta avatar

Watchers

Jaydeep Jivani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.