This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- saving the query --> | |
<?php $temp_query = clone $wp_query; ?> | |
<!-- listing out featured articles --> | |
<?php query_posts('category_name=featured&showposts=3'); ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<!-- Do special_cat stuff... --> | |
<?php endwhile; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if($post->post_parent) { | |
$parent_title = get_the_title($post->post_parent); | |
echo $parent_title; | |
} else { | |
wp_title(''); | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//in theme functions.php | |
// @see http://codex.wordpress.org/Function_Reference/register_post_type | |
$labels = array( | |
'name' => _x('Edição Digital', 'Edição Digital'), | |
'singular_name' => _x('edicao_digital', 'Edição Digital'), | |
'add_new' => _x('Nova Edição Digital', 'edicao_digital'), | |
'add_new_item' => __('Adicionar nova Edição Digital'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php include('../_connect.php');?> | |
<?php include('../../includes/helpers/short.php');?> | |
<?php | |
//-------------------------- ERRORS -------------------------// | |
$error_core = array('No data passed', 'API key not passed', 'Invalid API key'); | |
$error_passed = array('Email not passed', 'List ID not passed', 'Email does not exist in list'); | |
//-----------------------------------------------------------// | |
//--------------------------- POST --------------------------// | |
//api_key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="skype:echo123?call"> | |
Call the Skype Echo / Sound Test Service | |
</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(function_exists('fetch_feed')) { | |
include_once(ABSPATH.WPINC.'/feed.php'); | |
$feed = fetch_feed('http://feeds.feedburner.com/catswhoblog'); | |
$limit = $feed->get_item_quantity(7); // specify number of items | |
$items = $feed->get_items(0, $limit); // create an array of items | |
} | |
if ($limit == 0) echo '<div>The feed is either empty or unavailable.</div>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//see: http://codex.wordpress.org/Function_Reference/fetch_feed | |
//see: http://simplepie.org/wiki/reference/start#simplepie_item | |
?> | |
<h2><?php _e('Recent news from Some-Other Blog:'); ?></h2> | |
<?php // Get RSS Feed(s) | |
include_once(ABSPATH . WPINC . '/feed.php'); | |
// Get a SimplePie feed object from the specified feed source. | |
$rss = fetch_feed('http://feeds.feedburner.com/euqueroserummacaco/madeinnordeste'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_recent_comments($total=3, $excerpt_length=100){ | |
$pre_HTML =""; | |
$post_HTML =""; | |
global $wpdb; | |
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,".$excerpt_length.") AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT ".$total; |