Skip to content

Instantly share code, notes, and snippets.

View ScarletPonytail's full-sized avatar

ScarletPonytail ScarletPonytail

View GitHub Profile
@ScarletPonytail
ScarletPonytail / gist:6a8467dcbdd034de7cbcb433544720dc
Created February 24, 2017 13:31
Wordpress - Remove hyperlink from post title
It should be something like this:
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
Once you find the line you will need to remove the parts that make the title an active link, which include the <a href="<?php the_permalink() ?>"> and </a> tags. The final line should look like this:
<h2><?php the_title(); ?></h2>
@ScarletPonytail
ScarletPonytail / gist:1e8d1742f1703f6edc3f626ed808636e
Created February 24, 2017 13:31
Wordpress - Reset Password in PHPMyAdmin
UPDATE `wp_users` SET `user_pass`= MD5('yourpassword') WHERE `user_login`='yourusername';
eg. Update Admin
UPDATE `wp_users` SET `user_pass`= MD5('yourpassword') WHERE `user_login`='admin';
@ScarletPonytail
ScarletPonytail / text.php
Last active June 8, 2017 14:14
Wordpress - Pull a 'Page' shortcode into the theme
<?php echo do_shortcode("[shortcode]"); ?>
// Remember if the shortcode itself contains quote marks, you will need to replace the quotes wrapping the shortcode with single quotes.
@ScarletPonytail
ScarletPonytail / gist:966e069fb68ac99872fddba4950ce98a
Last active June 8, 2017 14:14
CSS - Test Align Viewport Bootstrap
text-xs-center text-sm-center text-md-left text-lg-left text-xl-left
@ScarletPonytail
ScarletPonytail / text.css
Last active March 23, 2018 14:35
Wordpress - WP-Image CSS
/* =WordPress Core
-------------------------------------------------------------- */
.alignnone {
margin: 5px 20px 20px 0;
}
.aligncenter,
div.aligncenter {
display: block;
margin: 5px auto 5px auto;
@ScarletPonytail
ScarletPonytail / wp-menu-no-link.txt
Last active June 8, 2017 14:14
Wordpress - WP-Menu No Link
@ScarletPonytail
ScarletPonytail / fishpig-wordpress.php
Last active November 17, 2017 14:01
Magento - [FishPig Wordpress Plugin] Adding Recent Blog Posts to a Magento Template File
<?php $posts = Mage::getResourceModel('wordpress/post_collection')
->addPostTypeFilter('post')
->setOrderByPostDate()
->addIsViewableFilter()
->setPageSize(5)
->load(); ?>
<?php if (count($posts) > 0): ?>
<ul>
<?php foreach($posts as $post): ?>
<li>
@ScarletPonytail
ScarletPonytail / gist:e6afb9bacac93fc770cfa4f68a3450f8
Created February 24, 2017 13:58
Magento - How to add featured product on Magento Store homepage
STEP: 1. To make featured product attribute.
Login to Magento admin area.
Now add attribute from tab
Catalog–>Attribute –> Manage Attribute–>Add New Attribute.
Attribute Properties to be set
Attribute Identifier: featured
Scope: Store View
@ScarletPonytail
ScarletPonytail / gist:dca19373fc951c97629b633a758c10ff
Created February 24, 2017 14:03
Magento - How to download Magento Connect extensions
01. Copy the key from the Magento Connect website.
02. Visit: http://freegento.com/ddl-magento-extension.php
03. Enter the key from Magento Connect.
04. Download the compressed file.
05. Put the compressed file into the root on the ‘.modman’ folder.
06. Unzip the compressed file in this directory.
07. Delete the compressed file.
08. Scour though the files to make sure there is nothing shady in there (find an adult).
@ScarletPonytail
ScarletPonytail / file.txt
Last active June 8, 2017 14:13
Magento - Error 503: Service Temporarily Unavailable
Delete the 'maintainance.flag from the root.