Skip to content

Instantly share code, notes, and snippets.

View jimboobrien's full-sized avatar

Jimobrien jimboobrien

View GitHub Profile
/* CHANGE URL IN DB */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~USE THIS ONE IN PHPMYADMIN ~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
UPDATE wp_posts set post_content=REPLACE(post_content, 'www.devServer.com/', 'www.liveServer.com/');
/* CUSTOM FIELDS INCLUDED */
UPDATE wp_postmeta SET meta_value= replace(meta_value, 'http://old-domain.com', 'http://new-domain.com');
<?php
/*
Template Name: Home Template
*/
?>
<?php get_header(); ?>
<section id="octane-video">
/*~~~~~~~~~~~~~
RESTART SERVICES
~~~~~~~~~~~~~~~*/
restart apache:
service named restart
OR
/scripts/restartsrv_apache
/* fix pesky slider */
.et_pb_slides .et_pb_slide { min-height: 500px; }
@media only screen and (max-width: 980px) {
.et_pb_slides .et_pb_slide { min-height: 300px; }
}
<?phpphp
/*
Template Name: Sitemap Template
*/
?>
<?php get_header(); ?>
<div class="container">
<!-- Example row of columns -->
<script src="https://checkout.stripe.com/checkout.js"></script>
<button id="customButton">Purchase</button>
<script>
var handler = StripeCheckout.configure({
key: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX',
image: '/img/documentation/checkout/marketplace.png',
locale: 'auto',
token: function(token) {
/*========================================
CSS Resets
=========================================*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
<?
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~PROPER WAY OF ADDING CHILD THEME CSS FILE ~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
$options = get_option('wpdc_options');
<?php
/*
Template Name: Sub-pages Template
*/
get_header();
global $more;
$is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() ); ?>
@jimboobrien
jimboobrien / cpt-columns.php
Created July 17, 2016 00:07
Custom Post Type with Custom Columns
/* ===============================================================================================
============================ CUSTOM POST TYPE ==================================================
================================================================================================*/
add_action( 'init', 'pegasus_cpt_init' );
function pegasus_cpt_init() {
/*============================
======= Portfolio Post Type ========