Skip to content

Instantly share code, notes, and snippets.

View phpbits's full-sized avatar
🎯
Focusing

Jeffrey Carandang phpbits

🎯
Focusing
View GitHub Profile
@phpbits
phpbits / style.css
Created September 12, 2017 08:59
Genesis Instagram Widget Custom Style
/* Instagram
---------------------------------------------------------------------------------------------------- */
.instagram {
overflow: hidden;
}
.instagram .wrap {
border-top: 1px solid #eee;
margin-left: auto;
@phpbits
phpbits / style.css
Created September 12, 2017 08:58
Full Width Genesis Footer w/ Styling
/* # Full Width Genesis Footer w/ Styling
------------------------------------------- */
.footer-widgets{
background-color: #232525;
}
.footer-widgets, .footer-widgets a, .footer-widgets .widgettitle{
color: #fff;
text-decoration: none;
}
.footer-widgets-1.footer-widget-area{
@phpbits
phpbits / functions.php
Created September 12, 2017 08:57
Enable WordPress Genesis Footer Widget Area
<?php
//* Add support for one fullwidth footer widgets
add_theme_support( 'genesis-footer-widgets', 1 );
?>
@phpbits
phpbits / umd-script-boilerplate.js
Created April 6, 2017 11:02 — forked from cferdinandi/umd-script-boilerplate.js
A simple boilerplate for UMD JS modules.
(function (root, factory) {
if ( typeof define === 'function' && define.amd ) {
define([], factory(root));
} else if ( typeof exports === 'object' ) {
module.exports = factory(root);
} else {
root.myPlugin = factory(root);
}
})(typeof global !== "undefined" ? global : this.window || this.global, function (root) {
@phpbits
phpbits / style.css
Created October 4, 2016 08:17
Genesis Custom Homepage Widgets Styling
/* # Homepage Widgets
---------------------------------------------------------------------------------------------------- */
.hp-widgets-section{
padding: 50px 0px 30px;
border-bottom: 1px solid #eee;
}
.hp-widgets-section .widget{
padding: 30px 20px 0px;
}
@phpbits
phpbits / functions.php
Last active October 4, 2016 08:07
Create Genesis Framework Widgetized Homepage
<?php
/* CUSTOM SIDEBAR
========================================================================== */
add_action('init', 'hp_register_sidebar_widgets');
function hp_register_sidebar_widgets(){
register_sidebar(array(
'name' => __( 'Homepage Widgets', 'widget-options' ),
'id' => 'homepage-widgets',
'description' => __( 'Widgets in this area will be shown on homepage after header section.', 'widget-options' ),
@phpbits
phpbits / testimonials_styles.css
Last active September 30, 2016 08:45
Genesis Testimonials Slider Custom CSS
.testimonial-wrap{
color: #fff;
padding-top: 50px;
padding-bottom: 50px;
margin-bottom: 50px;
background: rgba(118, 184, 82, 0.9); /** Change to your preferred color **/
text-align: center;
}
.testimonial-wrap span.above-title{
display: block;
@phpbits
phpbits / focus_display.php
Created September 30, 2016 07:57
Manage Focus WordPress Slider Display for Testimonials
<?php
//remove date meta display
add_action( 'focuswp_before_slide', 'focuswp_before_custom', 40 );
function focuswp_before_custom( $params ){
if( $params['item']->post_type == 'testimonials' ){
remove_action( 'focuswp_content_meta', array( $params['this'], 'slide_meta' ));
}
}
@phpbits
phpbits / testimonials_cpt.php
Last active September 30, 2016 07:44
Create Custom Post Type for Testimonials
<?php
//Create CPT for testimonials
add_action( 'init', 'testimonials_CPT', 0 );
function testimonials_CPT() {
$labels = array(
'name' => __( 'Testimonials', 'focuswp' ),
'singular_name' => __( 'Testimonials', 'focuswp' ),
'menu_name' => __( 'Testimonials', 'focuswp' ),
'name_admin_bar' => __( 'Testimonials', 'focuswp' ),
@phpbits
phpbits / widgets.css
Created May 13, 2016 10:52
Using a Plugin to Add Custom Styles to WordPress Widget
.widget.newsletter-green{
background-color: #19a87d;
color: #fff;
}
.widget.newsletter-green input{
border: 1px solid #fff;
}
.widget.newsletter-green input[type="submit"], .widget.newsletter-green button{
background-color: #ea6a1b;
color #fff;