Skip to content

Instantly share code, notes, and snippets.

View ScarletPonytail's full-sized avatar

ScarletPonytail ScarletPonytail

View GitHub Profile
@ScarletPonytail
ScarletPonytail / text.txt
Last active March 21, 2017 15:01
Wordpress - Captcha Shortcode
// Contact Form 7 reCAPTCHA
[recaptcha]
// Really Simply Captcha Plugin
<p>To prove your humanity, please enter the text in the box.</p>
<p>[captchac captcha-157][captchar captcha-157]</p>
@ScarletPonytail
ScarletPonytail / page-home.php
Last active March 30, 2017 12:32
Wordpress - Add posts 'Loop' of a certain category to theme file
// This example will display 3 posts from category 7
<?php query_posts('showposts=3&cat=7'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="col-md-4">
<h3><?php the_title(); ?></h3>
<?php the_excerpt(__('(more…)')); ?>
<a class="btn btn-default" href="<?php the_permalink() ?>" role="button">Read More</a>
</div>
<?php endwhile; endif; ?>
@ScarletPonytail
ScarletPonytail / fonts.js
Last active April 20, 2017 08:34
Magento - How to add Google Fonts to a Magento theme
WebFontConfig = {
google: { families: ['Source+Sans+Pro:400,700:latin', 'Lobster::latin', 'Unica+One::latin'] },
timeout: 2000 // Set the timeout to two seconds
};
(function () {
// NEEDED to push the wf-loading class to your head (fontloader does it too late!)
// its done this way to reliably work on IE and other browsers…
document.getElementsByTagName("html")[0].className = "wf-loading";
@ScarletPonytail
ScarletPonytail / gist:85df6abf467cfa787916a42245004847
Created April 20, 2017 08:38
Magento - How to show all items on a category page
System > Configuration > Catalog > Frontend > ‘Allow All products per Page’
Change setting to ‘Yes’.
@ScarletPonytail
ScarletPonytail / gist:d255805f3f4b6b6944967b65ea53ccf6
Created April 20, 2017 08:40
Magento - How to remove the Wishlist
01. Navigate to ‘System > Configuration > Customers > Wishlist’.
02. Dropdown ‘General Options’.
03. Change ‘Enabled’ to ‘No’.
04. Click ‘Save Config’.
@ScarletPonytail
ScarletPonytail / gist:162418f75f773d9f7d147f94f3699d21
Created April 20, 2017 08:41
Magento - How to remove the Compare links site-wide
This can only be achieved by installing an extension:
I have already downloaded the extension and saved it in the Magento folder, you can just install it locally within the Magento Connect area.
Link: http://www.magentocommerce.com/magento-connect/remove-compare.html
@ScarletPonytail
ScarletPonytail / gist:45770e65e6a12cbeb910fe56cc24dea9
Created April 20, 2017 08:42
Magento - How to disable customer reviews
1. Navigate to System > Configuration > Advanced.
2. Disable ‘Mage_Review’.
@ScarletPonytail
ScarletPonytail / functions.php
Last active June 1, 2017 13:32
CSS - Spinny Social Icons
// Add Font Awesome for social icons
function font_awesome() {
echo '<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" />';
}
add_action('wp_head', 'font_awesome');
@ScarletPonytail
ScarletPonytail / _note.txt
Last active June 8, 2017 14:05
HTML / JS - Filter Table
Tip: Remove toUpperCase() if you want to perform a case-sensitive search.
Tip: Change tr[i].getElementsByTagName('td')[0] to [1] if you want to search for "Country" (index 1) instead of "Name" (index 0).
@ScarletPonytail
ScarletPonytail / style.css
Last active June 8, 2017 14:06
CSS - Center align a Bootstrap Menu
/* Menu Styling Override */
@media (min-width: 992px) {
.navbar-nav {
float : none !important;
margin: 0 auto !important;
display: block !important;
text-align: center !important;
}