Skip to content

Instantly share code, notes, and snippets.

View palimadra's full-sized avatar

Pali Madra palimadra

View GitHub Profile
@smajda
smajda / aggregate-feed.php
Created October 7, 2009 16:41
Merge multiple RSS feeds with SimplePie
<?php
/* Merge multiple RSS feeds with SimplePie
*
* Just modify the path to SimplePie and
* modify the $feeds array with the feeds you want
*
* You should probably also change the channel title, link and description,
* plus I added a CC license you may not want
*
* Help from: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/
@jwdeane
jwdeane / Change WP domain
Created August 9, 2010 14:20
Changed your Wordpress domain?
// Edit themes functions.php. Right after initial <?php line place the following:
update_option('siteurl','http://example.com/blog');
update_option('home','http://example.com/blog');
@epicdaze
epicdaze / gist:1030943
Created June 17, 2011 06:11
#wordpress - remove wordpress version number #obfuscate #version
<!-- /* Remove version number from wordpress generated source and RSS feed.
http://www.wpbeginner.com/wp-tutorials/the-right-way-to-remove-wordpress-version-number/
*/ -->
<!-- /* remove this from header.php remove version from generated page source */ -->
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<!-- /* or add this to functions.php to remove version from generated page source */ -->
<?php remove_action('wp_head', 'wp_generator'); ?>
@matiskay
matiskay / wp-snippets.php
Created September 20, 2011 20:39
Wordpress Snippets
<?php
// http://johnford.is/programmatically-pull-attachments-from-wordpress-posts/
// http://www.wprecipes.com/how-to-show-wordpress-post-attachments
// get all of the images attached to the current post
function _get_images($size = 'thumbnail') {
global $post;
$photos = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') );
@johnpbloch
johnpbloch / query-thief.php
Created November 18, 2011 17:11
Hijacking the main WordPress query and loop for fun and profit
<?php
/*
* Plugin Name: Query Thief
* Description: Hijacking the main WordPress query and loop for fun and profit
* Version: 0.1
*/
// I namespace everything now that PHP 5.2.4 is the minimum requirement. :D
namespace JPB;
@thefuxia
thefuxia / all-actions-list.php
Created March 5, 2012 16:36
Plugin All Actions List
<?php # -*- coding: utf-8 -*-
/*
Plugin Name: All Actions List
Description: Lists all actions run during one request.
Version: 1.0
Required: 3.1
Author: Thomas Scholz
Author URI: http://toscho.de
License: GPL
*/
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@palimadra
palimadra / .htaccess
Created April 15, 2012 16:02 — forked from necolas/.htaccess
Simple, quick way to concatenate, minify, and version static files in a Wordpress theme
# Filename-based cache busting
# taken from https://github.com/h5bp/html5-boilerplate/
# This rewrites file names of the form `name.123456.js` to `name.js`
# so that the browser doesn't use the cached version when you have
# updated (but not manually renamed) the file.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
@devinrhode2
devinrhode2 / clean-scrollbar.css
Created May 2, 2012 03:42
Like, basically PERFECT scrollbars
/**
* Like, basically PERFECT scrollbars
*/
/*
It's pure CSS.
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars...
this has no fade-out effect.
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting.