Skip to content

Instantly share code, notes, and snippets.

View Netzberufler's full-sized avatar

Thomas Weichselbaumer Netzberufler

View GitHub Profile
@Netzberufler
Netzberufler / _mixins.scss
Last active February 15, 2019 18:59
Sass Mixins for Color Variables
// 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 November 21, 2018 14:03
GT Theme Settings
/**
* WordPress dependencies
*/
const { registerPlugin } = wp.plugins;
/**
* Internal dependencies
*/
import plugin from './plugin';
@Netzberufler
Netzberufler / functions-1.php
Last active April 24, 2018 11:48
WordPress Social Sharing Links
/**
* 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 December 14, 2017 12:22
Reset Featured Content Cache on WordPress.com
@Netzberufler
Netzberufler / scroll-to-top.js
Created September 28, 2017 14:39
Scroll to Top
/**
* Scroll to Top JS
*/
( function( $ ) {
$.fn.scrollToTop = function() {
var scrollButton = $( this );
@Netzberufler
Netzberufler / content-portfolio.php
Created May 4, 2017 10:33
Portfolio Template using Static Child Pages
<?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 April 12, 2017 13:18
Twenty Seventeen Full Width page template
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 December 19, 2016 10:58
TwentySixteen Footer with Widgets
@Netzberufler
Netzberufler / archive.php
Created November 10, 2016 16:24
Grid Layout mit Flexbox: WordPress Loop
<?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 November 7, 2016 16:29
Shortcode to display WordPress Menu
<?php
/**
* Shortcode to display a WordPress menu
*
*/
function theme_slug_menu_shortcode( $atts ) {
// Get Shortcode Parameters.
$menu = shortcode_atts( array(
'slug' => '',