Skip to content

Instantly share code, notes, and snippets.

View Netzberufler's full-sized avatar

Thomas Weichselbaumer Netzberufler

View GitHub Profile
@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 / footer.php
Created December 19, 2016 10:58
TwentySixteen Footer with Widgets
@Netzberufler
Netzberufler / themezee-featured-content-cache-reset.php
Created December 14, 2017 12:22
Reset Featured Content Cache on WordPress.com
@Netzberufler
Netzberufler / customizer.php
Last active February 26, 2018 06:25
Sidebar Layout Option im WordPress Customizer
<?php
/**
* Adds Layout Options section and sidebar position setting.
*
* @param WP_Customize_Manager $wp_customize The Customizer object.
*/
function theme_slug_customize_register( $wp_customize ) {
// Add layout options section.
$wp_customize->add_section( 'theme_slug_layout_options', array(
@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 / 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 / _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 / 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 / footer.php
Last active March 9, 2021 06:12
Footer Widgets
@Netzberufler
Netzberufler / functions.php
Created September 22, 2016 13:05
Blank Wordpress Child Theme
<?php
/**
* Theme Coder Child functions and definitions
*
* @package Theme Coder
*
*/
/**
* Enqueue scripts and styles.