Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Weichselbaumer Netzberufler

View GitHub Profile
@Netzberufler
Netzberufler / _mixins.scss
Last active Feb 15, 2019
Sass Mixins for Color Variables
View _mixins.scss
// Text Color Mixin.
@mixin color($colorVar) {
color: map-get($themeColors, $colorVar);
color: var($colorVar);
}
// Background Color mixin.
@mixin backgroundColor($colorVar) {
background-color: map-get($themeColors, $colorVar);
background-color: var($colorVar);
@Netzberufler
Netzberufler / index.js
Created Nov 21, 2018
GT Theme Settings
View index.js
/**
* WordPress dependencies
*/
const { registerPlugin } = wp.plugins;
/**
* Internal dependencies
*/
import plugin from './plugin';
@Netzberufler
Netzberufler / functions-1.php
Last active Apr 24, 2018
WordPress Social Sharing Links
View functions-1.php
/**
* Return Social Sharing Links.
*/
function theme_slug_social_sharing() {
// Get current page URL.
$page_url = get_permalink();
// Get current page title.
$page_title = get_the_title();
@Netzberufler
Netzberufler / themezee-featured-content-cache-reset.php
Created Dec 14, 2017
Reset Featured Content Cache on WordPress.com
View themezee-featured-content-cache-reset.php
View scroll-to-top.js
/**
* Scroll to Top JS
*/
( function( $ ) {
$.fn.scrollToTop = function() {
var scrollButton = $( this );
@Netzberufler
Netzberufler / content-portfolio.php
Created May 4, 2017
Portfolio Template using Static Child Pages
View content-portfolio.php
<?php
/**
* The template used for displaying portfolio items.
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php the_permalink(); ?>" rel="bookmark">
<?php the_post_thumbnail( 'medium' ); ?>
@Netzberufler
Netzberufler / style.css
Created Apr 12, 2017
Twenty Seventeen Full Width page template
View style.css
body.page-template-template-full-width #content #primary {
max-width: 100%;
}
body.page-template-template-full-width #content #primary .entry-header,
body.page-template-template-full-width #content #primary .entry-content {
float: none;
width: 100%;
}
@Netzberufler
Netzberufler / footer.php
Created Dec 19, 2016
TwentySixteen Footer with Widgets
View footer.php
@Netzberufler
Netzberufler / archive.php
Created Nov 10, 2016
Grid Layout mit Flexbox: WordPress Loop
View archive.php
<?php
/**
* The template for displaying archive pages
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
@Netzberufler
Netzberufler / functions.php
Created Nov 7, 2016
Shortcode to display WordPress Menu
View functions.php
<?php
/**
* Shortcode to display a WordPress menu
*
*/
function theme_slug_menu_shortcode( $atts ) {
// Get Shortcode Parameters.
$menu = shortcode_atts( array(
'slug' => '',
You can’t perform that action at this time.