Skip to content

Instantly share code, notes, and snippets.

@sungraizfaryad
sungraizfaryad / additional-meta-box.php
Last active October 31, 2019 17:19
You can create additional metabox and display them on frontend.
Class Inspiry_Additional_Meta_Fields_Builder {
public static $_instance;
public $meta_box_data;
function __construct(){
$this->meta_box_data = $this->inspiry_get_meta_box_value_array();
@scottparry
scottparry / functions.php
Created February 21, 2018 07:04
Enqueue Google fonts in WordPress theme
/**
* Enqueue custom fonts using protocol relative URL.
*
* Syntax: wp_enqueue_style( $handle, $src, $deps, $ver, $media );
* Ensure $handle is unique to prevent conflicts with plugins
*
* Note(s): The pipe (|) operator is used to load multiple typefaces in a single call. We also only load the weights we want * by comma seperating them, instead of loading every available weight.
*/
function theme_prefix_fonts()
{
@helen
helen / repeatable-fields-metabox.php
Created January 11, 2012 04:42
Repeating Custom Fields in a Metabox
<?
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {