Coder Social home page Coder Social logo

benbrehaut / wp-vanlig Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 578 KB

Blank WordPress starter theme made for being customisable.

PHP 67.65% JavaScript 2.51% CSS 29.84%
blank-wordpress-theme browsersync gulp php sass starter-theme theme wordpress wordpress-development wordpress-starter-theme wordpress-theme

wp-vanlig's Introduction

๐Ÿ‘‹ About me

JavaScript Engineer working on React, TypeScript, design systems, a11y and anything else that is cool and trendy.

wp-vanlig's People

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

gjportegies

wp-vanlig's Issues

Draft posts show in Sidebar Recent Posts

For some stupid reason, WordPress by deafult function wp_get_recent_posts shows draft posts, which is stupid.

Can be fixed with adding to the array;

$recent_posts = wp_get_recent_posts(array( 'orderby' => 'post_date', 'numberposts' => 3, 'post_type' => 'post', 'post_status' => 'publish,', ) );

Add support for Post Formats

add_theme_support( 'post-formats', array( 'aside',  'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat' ) );

Might be worth adding it but not enabling it, as it is never used.

Adjust WP Sticky Post Class

function sticky_posts( $classes ) {
	if ( in_array( 'sticky', $classes, true ) ) {
	    $classes = array_diff($classes, array('sticky'));
	    $classes[] = 'post--sticky';
	}
	return $classes;
}
add_filter('post_class','sticky_posts');

Investigate to disable wp-embed.js file

File seems pointless to have, as no one seems to fully use it.

Can easily be disabled.

function my_deregister_scripts(){
  wp_deregister_script( 'wp-embed' );
}
add_action( 'wp_footer', 'my_deregister_scripts' );

Rename gulp imgs task to correct image folder

Old

gulp.task('imgs', function () {
  gulp.src('assets/imgs/*')
    .pipe(imagemin())
    .pipe(gulp.dest('assets/imgs'));
});

New

gulp.task('imgs', function () {
  gulp.src('assets/img/*')
    .pipe(imagemin())
    .pipe(gulp.dest('assets/img'));
});

Update _helpers.scss with new helpers

// - - - - - - - - - - - - - - - - - - - - - - - - -
// :Helpers
// - - - - - - - - - - - - - - - - - - - - - - - - -

// Accessibility Hidden
// ------------------
._sr-hidden {
  @include element-invisible;
}

// Responsive Classes
// ------------------

// Show only function to generate hidden classes
@each $show-only in $breakpoint-classes {
  ._show-only--#{$show-only} {
    display: none;
  }
}

._show-only--sml {
  @include breakpoint(small only) {
    display: block;
  }
}

._show-only--med {
  @include breakpoint(medium only) {
    display: block;
  }
}

._show-only--lrg {
  @include breakpoint(large only) {
    display: block;
  }
}

// Background Colors
// ------------------
._slab-primary {
  background-color: $palette-primary;
}

._slab-secondary {
  background-color: $palette-secondary;
}

._slab-tertiary {
  background-color: $palette-tertiary;
}

// Text Colors
// ------------------
._text-color-primary {
  color: $palette-primary;
}

._text-color-secondary {
  color: $palette-secondary;
}

._text-color-tertiary {
  color: $palette-tertiary;
}

// Text Helpers
// ------------------
._text-caps {
  text-transform: uppercase;
}

._text-l {
  text-align: left;
}

._text-c {
  text-align: center;
}

._text-r {
  text-align: right;
}

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.