Giter Site home page Giter Site logo

solidbunch / starter-kit-theme Goto Github PK

View Code? Open in Web Editor NEW
27.0 5.0 6.0 8.21 MB

WordPress starter theme with a modern development stack for launching projects faster and easily

License: MIT License

PHP 44.23% CSS 20.34% JavaScript 27.98% HTML 3.34% SCSS 3.99% Handlebars 0.12%
wordpress wordpress-theme wordpress-theme-development wordpress-development wordpress-starter-theme wordpress-boilerplate

starter-kit-theme's Introduction

Starter Kit theme

GitHub GitHub release (latest by date)

WordPress starter theme with a modern development stack for launching projects faster and easily.

Requirements

How to use

Installation

  1. Create a new theme directory in wp-content/themes:
mkdir you-theme-dir && cd you-theme-dir
  1. Clone Starter Kit Theme:
git clone --depth=1 [email protected]:solidbunch/starter-kit-theme.git . && rm -rf .git
  1. Setup php dependencies:
composer install
  1. Setup node dependencies and dev mode build:
npm run install-dev

Build commands

  • Build minified assets for production:
npm run prod
  • Build assets with source maps for development:
npm run dev
  • Start watcher with browser sync for development:
npm run watch
Yarn commands
  • yarn - setup node dependencies;
  • yarn prod - build minified assets;
  • yarn dev- build assets with source maps (for development);
  • yarn watch- start watcher;
  • yarn browser-sync - start watcher with browser sync;

Structure

── app/                                # Main theme functionality files
   ├── Base/                           # Base theme functions
   │   ├──Hooks.php                    # Registering hooks
   │   ├──Settings.php                 # Theme settings framework initialization
   │   ├──Shortcode.php                # Shortcode object configuration
   │   └──ShortcodesManager.php        # Register and load shortcodes
   │
   ├── config/                         # Base theme configuration
   │   ├──_animations.php              # CSS animations declaration
   │   ├──_social_icons.php            # Social CSS classes settings. Font Awesome default
   │   ├──_social_profiles.php         # Register social profiles meta for website options
   │   └──config.php                   # Bootstrap config file
   │
   ├── Handlers/                       # Theme hook handlers, main functionality
   │   ├──PostMeta/                    # Registering meta fields for post types. Each file separately. Runs by Base/Hooks
   │   ├──PostTypes/                   # Registering custom post types with Taxonomies. Runs by Base/Hooks
   │   ├──Settings/                    #
   │   │  └──ThemeSettings.php/        # Theme settings creation. Look in wp-admin Appearance/Theme Settings
   │   ├──Backend.php                  # wp-admin functions
   │   ├──Front.php                    # Basic Front handlers
   │   ├──HTTP2.php                    # HTTP2 support
   │   ├──LayoutGlobal.php             # Builds global theme layout using actions
   │   ├──LayoutSingle.php             # Builds single post / page etc. layout using actions
   │   ├──LazyLoad.php                 # Lazy load for images
   │   ├──Menu.php                     # Menu registration hooks and methods
   │   ├──OAuth.php                    # Oauth support
   │   ├──Optimization.php             # Removes unnecessary tags, performance optimization
   │   ├──Security.php                 # Provides some security options. Disable xmlrpc, etc
   │   ├──SetupTheme.php               # Setup theme handlers
   │   ├──VisualComposer.php           # Rewrite default WPBakery Page Builder functions
   │   └──VisualComposerExtends.php    # Extend default functional of WPBakery Page Builder
   │
   ├── Helper/                         # Helpers classes
   │   ├──ResponsiveImages/            # Modern responsive images with <picture> or <img>
   │   ├──Assets.php                   # Helper to work with assets processed by webpack
   │   ├──Front.php                    # Helper functions for templates and Front handler
   │   ├──Media.php                    # Functions to help to output and resize media
   │   ├──Utils.php                    # Other useful functions
   │   └──View.php                     # Connect and output templates
   │
   ├── Repository/                     # Repositories, help to receive data from DB
   │   └──*.php                        # Classes by each post type
   │
   ├── Shortcodes/                     # Shortcodes library (works with/without WPBakery Page Builder)
   │   ├── alert/                      # Alert block (icon, styling)
   │   ├── button/                     # Button element (icon, link, layout, styling)
   │   ├── contact_form/               # Form and form elements (checkbox, email, file uploader, text, datepicker and other)
   │   ├── google_map/                 # Improved Google Map
   │   ├── heading/                    # Heading h1,h2,h3,h4,h5,h6 (font styling, layout)
   │   ├── menu/                       # Custom menu with desktop and mobile devices support
   │   ├── news/                       # News block
   │   ├── posts/                      # Posts block (pagination, styling)
   │   ├── pricing_table/              # Pricing table (price settings, styling)
   │   ├── social_login/               # Login using social networks Facebook, Twitter, Google
   │   ├── tabs/                       # Tabs shortcode
   │   └── toggles/                    # Accordion shortcode
   │
   ├── templates/                      # HTML or other templates
   ├── Widgets/                        # Theme widgets
   ├── AbstractSingleton.php           # Abstract Class for creating Singleton Classes
   ├── App.php                         # Application Singleton. Entrypoint
   └── dev.php                         # Some developers functions for debug, logging, etc

── assets/                             # Theme assets
   ├── css/
   ├── fonts/
   ├── images/
   ├── js/
   └── libs/

── build/                              # Webpack configs
── dist/                               # The compiled assets
── template-parts/                     # Front templates

── vendor-custom/                      # Third-party development
   ├── aq_resizer/                     # Resizes WordPress images on the fly
   ├── carbon-fields/                  # Developer-oriented library for WordPress custom fields for all types of WordPress content
   ├── oauth/                          # Facebook, Google, Twitter libs for OAuth
   ├── tgm/                            # Required plugin installation
   └── wp-bootstrap-navwalker/         # Make awesome bootstrap menu

── 404.php
── comments.php
── footer.php
── functions.php
── gulpfile.js
── header.php
── index.php
── package.json
── page.php
── page-tpl-no-sidebar.php
── postcss.config.js
── screenshot.png
── sidebar.php
── single.php
── style.css
── webpack.config.js

Blocks

Overview

Gutenberg Blocks in the blocks/ folder are loaded with the autoloader. That is, you can simply create a folder of a new block with the necessary files and this blocks will be automatically available.

Use StarterBlock as an example to create new blocks.

Structure

The file structure can be any, you can add your files, but here are three files config.php, ajax.php and shortcode.php - loads by the autoloader.

── assets/              # All assets (styles, scripts, fonts, etc)
   ├── style.scss
   ├── scripts.js
   └── images/
── childs/              # Nested shortcodes, have the same structure
── view/                # Shortcode templates
── ajax.php             # Backend functions for ajax queries
── config.php           # Shortcode config (required file)
── shortcode.php        # Shortcode controller (required file)
── vc.php               # WPBakery Page Builder support

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.