Skip to content

Instantly share code, notes, and snippets.

View dryan1144's full-sized avatar

David Ryan dryan1144

View GitHub Profile
<?php if (is_product() || is_cart() || is_checkout() || is_wc_endpoint_url('order-received')) {
if (is_product()) {
echo '<h1>Register</h1>';
} elseif (is_cart()) {
echo '<h1>Review Order</h1>';
<?php echo '';?>
<body class="page-parent-about page-aboutsubpage">
<style>
.page-parent-about h2 {
color:orange;
}
</style>
</body>
<div class="container">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
<div class="sidebar about-sidebar">
<h3>Unique About Page Sidebar</h3>
<p>Some stuff.</p>
</div>
<div class="container">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
<?php
if (is_page('about') {
get_sidebar('about');
@dryan1144
dryan1144 / custom-share.php
Last active December 21, 2015 05:08
Custom share functionality
function healingartsweb_custom_share() {
$post_type = get_post_type_object( get_post_type($post) ); ?>
<div class="custom-share-container">
<h3>Share this <?php echo $post_type->labels->singular_name ?></h3>
<ul class="social-media-icons clearfix">
<li class="facebook"><a href="http://www.facebook.com/sharer.php?u=<?php echo get_permalink();?>&t=<?php the_title();?>" target="_blank" title="Share on Facebook">&#xe002;</a></li>
@dryan1144
dryan1144 / custom-share-template-tag
Last active December 21, 2015 05:08
Template tag for custom share functionality. Add to single.php and/or page.php.
<?php if ( function_exists('healingartsweb_custom_share') ) {
healingartsweb_custom_share();
} ?>
@dryan1144
dryan1144 / custom-share.css
Last active December 21, 2015 05:09
Basic CSS styling for custom share.
/*Healing Arts Web Custom Share Icons*/
/*Change reference to font folder if necessary*/
@font-face {
font-family: 'icomoon';
src:url('fonts/icomoon.eot');
src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),
url('fonts/icomoon.woff') format('woff'),
url('fonts/icomoon.ttf') format('truetype'),
url('fonts/icomoon.svg#icomoon') format('svg');
/*Resets and Defaults by healingartswebdesign.com*/
* {
box-sizing: border-box;
margin:0;
padding:0;
}
::selection {
background:#000;
color:#FFF;
<?php
function hck_questions_cpt() {
$labels = array(
'name' => _x( 'Topics', 'healthcarekit' ),
'singular_name' => _x( 'Topic', 'healthcarekit' ),
'search_items' => __( 'Search Topics', 'healthcarekit' ),
'all_items' => __( 'All Topics', 'healthcarekit' ),
'parent_item' => __( 'Parent Topic', 'healthcarekit' ),