Skip to content

Instantly share code, notes, and snippets.

View MartinPereiraP's full-sized avatar

Martin Pereira MartinPereiraP

View GitHub Profile
@techpulsetoday
techpulsetoday / breadcrumbs-code-without-plugin.php
Last active June 11, 2021 14:23
By adding this to functions.php to display the menu, just use this function to display it wherever you want.
<?php
/*=============================================
BREADCRUMBS
=============================================*/
// to include in functions.php
function the_breadcrumb()
{
$showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show
$delimiter = '&raquo;'; // delimiter between crumbs
$home = 'Home'; // text for the 'Home' link
@bkaminski
bkaminski / bootstrap-carousel-v4.php
Last active January 17, 2019 09:08
WordPress Loop Inside Bootstrap 4.0.0 Carousel -- No Inline Styles
@sandrovicente
sandrovicente / remove-dotnet-cli-osx
Created July 3, 2016 21:37
Steps to uninstall a DotNet CLI version on Mac OS X
# delete the dotnet folder under /usr/local/share/dotnet
1. cd /usr/local/share/dotnet && ls
2. sudo rm -rf dotnet
# delete the dotnet reference file at /etc/paths.d/dotnet
1. cd /etc/paths.d && ls
2. sudo rm dotnet
@jrfnl
jrfnl / functions-add-icons.php
Created May 26, 2014 19:30
Easily add favicon and apple touch and Windows8 icons to the html page header of a WordPress website
<?php
/**
* Add favicon and apple touch and Windows8 icons to the html page header of a WordPress website
*
* Add the favicon link properly to the page header so it will work in all browsers
* Add apple touch icons
* Add the Windows8 icons
* Presumes you will add the icons in the theme directory in a subfolder '/images/icons/'
* - adjust if you use another folder.
@kaseybon
kaseybon / mullet-loop.php
Last active September 20, 2019 16:42
Wordpress Mullet Loop: Place this loop in the index.php. Gives the option to pull in a custom content template for the most recent blog post in the blog feed e.g. Show full blog post for most recent post while only showing excerpts for older posts.
<?php if (have_posts()) : ?>
<?php $count = 0; ?>
<?php while (have_posts()) : the_post(); ?>
<?php $count++; ?>
<!-- Check for the first blog post in the loop && makes sure it the first page of results && makes sure it is the blog -->
<?php if ($count == 1 && $paged == 0 && is_home()) : ?>
<!-- Most recent blog post with custom template will display above older entries - Requires a content-featured.php or whatever you want to name your file or replace with code -->
<?php get_template_part( 'content', 'featured' ); ?>