Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
codigoconjuan / front-page.php
Created July 4, 2017 03:56
Bootstrap 4 Slider with WordPress
<div id="main-slider" class="carousel slide mt-4" data-ride="carousel">
<?php $args = array(
'posts_per_page' => 5,
'tag' => 'slider'
);
$slider = new WP_Query($args);
if($slider->have_posts()):
$count = $slider->found_posts;
?>
@kaishin-r
kaishin-r / sublime-text-3-cloud-drive-sync
Created February 19, 2016 09:48
Sync Sublime Text 3 Settings via iCloud Drive
# Create a directory named "Sublime Text 3 Sync" under iCloud Drive
mkdir ~/Library/Mobile\ Documents/com~apple~CloudDocs/SubLime\ Text\ 3\ Sync
# Enter Sublime Text 3's directory
cd ~/Library/Application\ Support/Sublime\ Text\ 3/
# Move "Installed Packages" directory to iCloud Drive and make a link
mv Installed\ Packages/ ~/Library/Mobile\ Documents/com~apple~CloudDocs/SubLime\ Text\ 3\ Sync/
ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/SubLime\ Text\ 3\ Sync/Installed\ Packages
@viruthagiri
viruthagiri / sharing_caring.php
Created March 31, 2012 18:29 — forked from ramseyp/sharing_caring.php
Social Media Sharing code for WordPress articles
<?php
/* Add a social media share box to your WordPress site.
If you want the email sharing, you'll need to install WP-Email: http://wordpress.org/extend/plugins/wp-email/
Insert <?php s25_sharing_caring(); ?> to your template where you want the box to appear. Must be used inside the Loop.
Facebook Like Button code can be built here: http://developers.facebook.com/docs/reference/plugins/like/
Tweet Button code: https://dev.twitter.com/docs/tweet-button
LinkedIn Share Button: http://developer.linkedin.com/plugins/share-plugin-generator
Google Plus 1: http://www.google.com/webmasters/+1/button/