Coder Social home page Coder Social logo

mattbanks / wordpress-starter-theme Goto Github PK

View Code? Open in Web Editor NEW
742.0 742.0 226.0 514 KB

WordPress Starter Theme for use as a starting template for building custom themes. Uses SCSS, Normalize, AutoPrefixr, Grunt for compilation/linting/deployments, and BrowserSync for cross-device auto refreshing.

License: GNU General Public License v2.0

PHP 84.54% JavaScript 3.04% CSS 12.43%

wordpress-starter-theme's Introduction

Matt Banks personal site

My personal site, running on Gatsby.

Netlify Status

Setup

  1. Clone this repo
  2. Run npm run develop
  3. Go to town!

Build

  1. Run npm run build

Deploy

This repo is setup to auto deploy to Netlify

wordpress-starter-theme's People

Contributors

ddropik avatar garyjones avatar irkanu avatar jjmu15 avatar jrencz avatar mattbanks avatar unibozu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress-starter-theme's Issues

Required Plugins

Hi there is no mention of the required plugins in the docs yet when you activate the plugin they are listed as such.

Are they merely recommended? Keen to hear your thoughts and thanks for a really good starter compass theme.

gulp file setup really slow.

Hello Mattbanks,

Thanks for making such a great gulp.js file template environnement.
I was although why my setup seems to be so slow... Finished 'styles' after 6.65 s in my case. Here's a sample of my gulpfile.js setup.

Let me know!
Thanks

// Load plugins
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')({
camelize: true
}),
lr = require('tiny-lr'),
server = lr();
var gutil = require('gulp-util');

// Error Handling
var onError = function (err) {
plugins.util.beep();
};

// Styles
gulp.task('styles', function() {
return gulp.src('assets/styles/source/*.scss')
.pipe(plugins.plumber({
errorHandler: onError
}))
.pipe(plugins.rubySass({
compass: true,
lineNumbers : true,
// sourcemap: true
}))
// .pipe(plugins.autoprefixer('last 2 versions', 'ie 9', 'ios 6', 'android 4'))
.pipe(gulp.dest('assets/styles/build'))
// .pipe(plugins.minifyCss({
// keepSpecialComments: 1
// }))
.pipe(plugins.livereload(server))
.pipe(gulp.dest('./'))
.pipe(plugins.notify({
message: 'Styles task complete'
}));
});

// Styles
gulp.task('phpfiles', function() {
return gulp.src('header.php')
.pipe(plugins.plumber({
errorHandler: onError
}))
.pipe(plugins.livereload(server))
.pipe(plugins.notify({
message: 'Phpfiles task complete'
}));
});

// Vendor Plugin Scripts
gulp.task('plugins', function() {
return gulp.src(['assets/js/source/plugins.js', 'assets/js/vendor/*.js'])
.pipe(plugins.concat('plugins.js'))
.pipe(gulp.dest('assets/js/build'))
.pipe(plugins.rename({
suffix: '.min'
}))
.pipe(plugins.uglify())
.pipe(plugins.livereload(server))
.pipe(gulp.dest('assets/js'))
.pipe(plugins.notify({
message: 'Scripts task complete'
})
.on('error', gutil.beep));

});

// Site Scripts
gulp.task('scripts', function() {
return gulp.src(['assets/js/source/*.js', '!assets/js/source/plugins.js'])
.pipe(plugins.jshint('.jshintrc'))
// .pipe(plugins.jshint.reporter('default'))
// .pipe(plugins.concat('main.js'))
.pipe(gulp.dest('assets/js/build'))
.pipe(plugins.rename({
suffix: '.min'
}))
// .pipe(plugins.uglify())
.pipe(plugins.livereload(server))
.pipe(gulp.dest('assets/js'))
.pipe(plugins.notify({
message: 'Scripts task complete'
}));
});

// Images
gulp.task('images', function() {
return gulp.src('assets/images/*/')
.pipe(plugins.cache(plugins.imagemin({
optimizationLevel: 7,
progressive: true,
interlaced: true
})))
.pipe(plugins.livereload(server))
.pipe(gulp.dest('assets/images'))
.pipe(plugins.notify({
message: 'Images task complete'
}));
});

// Watch
gulp.task('watch', function() {

// Listen on port 35729
server.listen(35729, function(err) {
    if (err) {
        return console.log(err);
    }
    // Watch .php files
    gulp.watch('header.php', ['phpfiles']);

    // Watch .scss files
    gulp.watch('assets/styles/source/**/*.scss', ['styles']);

    // Watch .js files
    gulp.watch('assets/js/**/*.js', ['plugins', 'scripts']);

    // Watch image files
    // gulp.watch('assets/images/**/*', ['images']);

});

});

// Default task
gulp.task('default', ['styles', 'plugins', 'scripts', 'images', 'watch']);

Incorrect path for skip-link-focus-fix.js and navigation.js

In lib/theme-functions.php, lines 87 and 89, these files are missing a slash after the get_template_directory_uri() function, so they give a 404 when visiting the website:

  • assets/js/vendor/skip-link-focus-fix.js
  • assets/js/vendor/navigation.js

Suggested fix:

    wp_enqueue_script( '_mbbasetheme-navigation', get_template_directory_uri() . '/assets/js/vendor/navigation.js', array(), '20120206', true );

    wp_enqueue_script( '_mbbasetheme-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/vendor/skip-link-focus-fix.js', array(), '20130115', true );

Sass error : File not found

When running grunt after installing from scratch, i got this error :
Error: File to import not found or unreadable: partials/spritesheet.
Load path: /wordtest/wp-content/themes/starter-theme
on line 31 of assets/styles/style.scss

Looks like there's a blank _spritesheets.scss file missing in 1821e08

Display Tweets plugin

@mattbanks Apologies if this is a plugin issue rather than a theme issue but I am not sure where the issue lies at the moment.

The conflict arises when the 'Display Tweets' plugin is enabled with your theme.

http://wordpress.org/plugins/display-tweets-php/

The plugin has a settings page that is normally located under Settings called 'Twitter Feed'. When the plugin is enabled with your theme the menu item disappears and the page returns a You do not have sufficient permissions to access this page.

/wp-admin/options-general.php?page=displaytweets

This erroneous message does not occur and the Setting menu item is listed when the default Twenty Thirteen theme is enabled.

I have tested this on a vanilla WordPress 3.7.1 install, logged in as admin with only your Starter Theme and the Display Tweets plugin. Please advise where to go next because its got me stumped.

Grunt imagemin error - "Cannot read property 'contents' of undefined"

When I run grunt, it fails at imagemin:dist. I haven't modified any code in any ways.
I'm running Windows 10, with node version 6.9.1 and npm version 3.10.8.

Expected behavior

Execute the imagemin:dist without errors

Actual behavior

Returned error Fatal error: Cannot read property 'contents' of undefined

Console log

$ grunt
Running "sass:dist" (sass) task

Running "autoprefixer:files" (autoprefixer) task
>> 2 autoprefixed stylesheets created.
>> 2 sourcemaps created.

Running "cssmin:minify" (cssmin) task
>> 2 files created. 23.21 kB → 7.5 kB

Running "uglify:plugins" (uglify) task
>> 1 sourcemap created.
>> 1 file created.

Running "uglify:main" (uglify) task
>> 1 sourcemap created.
>> 1 file created.

Running "imagemin:dist" (imagemin) task
Fatal error: Cannot read property 'contents' of undefined

"styles" task finised after >30s on Windows

Hi !

I have a problem with the "styles" gulp task.

It immediatly compiles .scss files really well, but the task take more than 30s to finish, and I get 4 "Styles task complete" before it finish. During these 30s, the task can't be run, so I have to wait these 30s to compile again my files.

Other tasks like "scripts" last like 10s, and five me 2 notifications.

Do you have a solution ?

I'm on Windows.

Thank you,
Thomas

Getting Error Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_set_excerpt_length' not found or invalid function name in C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php on line 298

Hi,
I'm getting this error when I try to add this function for the excerpt length.

function wp_set_excerpt_lenght( $length ){
	return 20;
}

add_filter( 'excerpt_length', 'wp_set_excerpt_length');

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_set_excerpt_length' not found or invalid function name in C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php on line 298

dw

browser

I'm new to Wordpress actually.

Can you help in here?
Thanks in advance.

grunt deploy:production gives rsync error

I'm running Windows and trying to deploy my local theme using deploy task. For some reason, it's giving me an error. I've been using cmd.exe with Admin rights so that shouldn't be a problem. I've double checked the settings to make sure my creds are right and I don't see the problem there either.

Here's what I'm seeing (with everything being correct but obfuscated for privacy):
rsync-error

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.