Skip to content

Instantly share code, notes, and snippets.

@adamfairholm
Created September 14, 2011 03:01
Show Gist options
  • Save adamfairholm/1215762 to your computer and use it in GitHub Desktop.
Save adamfairholm/1215762 to your computer and use it in GitHub Desktop.
EE vs. Wordpress
// ExpressionEngine Fully-Functional Blog Code:
{exp:channel:entries channel="blog"}
{title}
{/exp:channel:entries}
// Stripped Down Wordpress Blog Code:
// Get your blog code random access key
// this will
$key = md5(CREDIT_CARD_NUMBER, 'random_string');
// Does this code match any of the first names of the cast members of
// the 1970's show "Taxi"?
$names = array('Alex', 'Louie', 'Elaine', 'Tony', 'Jeff', 'Bobby');
if(in_array($names))
{
define('KEY_IS_NOT_TAXI_CHARACTER_FIRST_NAME', true);
}
if(KEY_IS_NOT_TAXI_CHARACTER_FIRST_NAME){
// Figure out which order to make the posts in
$post_order = new PostOrderSorter();
$order = $post_order->Initialize_post_orderAlgorithm();
if($order != 'invalid_order')
{
initialize_sort($order);
}
// Get the posts
while(the_posts_from_your_blog() as $blog->wordpress){
if(there_are_posts_to_show())
{
echo '<h1>'.show_your_post_title($order).'</h1>';
echo '<p class="'.metadata_call_for_your_post().'">Posted by'.the_post_author_first_name($order).' '.the_post_author_last_name_string(LAST_NAME_FORMAT).' on ';
// Initialize Date
$date_format = new_date_format(FORMAT, $key, KEY_IS_NOT_TAXI_CHARACTER_FIRST_NAME);
echo $date_format;
echo '</p>';
echo the_post_text();
}
}
}
@adamfairholm
Copy link
Author

Caveat: There may be some bugs. It may look complicated but Wordpress is well documented. Once you get the hang of it you can give back to the community releasing all sorts of shit that doesn't work.

@stephencozart
Copy link

LOL

@calvinfroedge
Copy link

Kudos, Adam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment