Skip to content

Instantly share code, notes, and snippets.

View dryan1144's full-sized avatar

David Ryan dryan1144

View GitHub Profile
@dryan1144
dryan1144 / output-blog-content.php
Last active August 29, 2015 14:06
Add blog page content before posts
<?php
/*
----------------------------------------------------------------------------------
Ouput content for blog page (Settings > Static page > posts page) page above posts
----------------------------------------------------------------------------------
*/
function wphandcrafted_add_blog_page_content() {
if ( is_home() ) {
@dryan1144
dryan1144 / remove-wp-version.php
Last active August 29, 2015 14:01
Remove WP version from header
//Place in functions.php
//removes WP version from header
function healingartsweb_remove_version() {
return '';
}
add_filter('the_generator', 'healingartsweb_remove_version');
/*Resets and Defaults by healingartswebdesign.com*/
* {
box-sizing: border-box;
margin:0;
padding:0;
}
::selection {
background:#000;
color:#FFF;
@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');
@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.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>
<div class="container">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
<?php
if (is_page('about') {
get_sidebar('about');
<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>
<body class="page-parent-about page-aboutsubpage">
<style>
.page-parent-about h2 {
color:orange;
}
</style>
</body>
<?php echo '';?>