Skip to content

Instantly share code, notes, and snippets.

<?php
$queryArgs = array( 'showposts' => 3,
'what_to_show' => 'posts',
'nopaging' => 0,
'orderby' => 'rand'
);
function filter_where($where = '') {
$start_date = date("Y-m-d");
$end_date = date("Y-m-d", strtotime('-365 days'));
//$where .= " AND post_date >= `".$start_date."` AND post_date <= `".$end_date."`";
$querystr = "
SELECT *
FROM $wpdb->posts wposts
INNER JOIN $wpdb->postmeta wpostmeta ON wposts.ID = wpostmeta.post_id
INNER JOIN $wpdb->term_relationships ON wposts.ID = $wpdb->term_relationships.object_id
INNER JOIN $wpdb->term_taxonomy ON $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id
INNER JOIN $wpdb->terms ON $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id
WHERE wposts.post_status = 'publish'
AND wposts.post_type = 'post'
AND $wpdb->term_taxonomy.taxonomy = 'category'
<?php
$cdstn = $table_prefix.'slv_comment_display_status';
$pdstn = $table_prefix.'slv_post_display_status';
$clstn = $table_prefix.'slv_click_status';
$dataPostDisplay = $wpdb->get_results("SELECT * FROM $wpdb->posts
INNER JOIN $wpdb->term_relationships ON $wpdb->posts.ID = $wpdb->term_relationships.object_id
INNER JOIN $wpdb->term_taxonomy ON $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id
INNER JOIN $wpdb->terms ON $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id
<?php
/*
Test URL
http://www.filipinasexdiary.com/postscript/fsdpost.php?action=CHANGE&memberid=2039&username=testguy&password=wasd1234&email=charles3@vdbucks.com&new_username=testguy1&old_username=testguy&new_password=wasd4321
*/
error_reporting(E_ALL);
ini_set('display_errors', '1');
include '/home/fsdadm/domains/members.filipinasexdiary.com/public_html/wp-blog-header.php';
include '/home/fsdadm/domains/members.filipinasexdiary.com/public_html/wp-admin/includes/user.php';
/* change content when user click show more post/comment page open */
add_action('the_content', 'display_post');
function display_post() {
global $post;
if(is_page('notifications')) {
include_once('notifications-display.php');
} else {
return $post->post_content;
}
}
<?php
// page totals
$first_page_total= 9; // total posts on first page
$paginated_total = 18; // total number of posts on paginated pages
//query args
$idObj1 = get_category_by_slug('updates');
$catid1 = $idObj1->term_id;
$args1 = array(
<?php
/**
* Post Content for 'This Weeks Diary' page
*/
global $theme;
?>
<?php
$data = $_POST;
//print_r($data);
<?php
/*
Plugin Name: fsd-calendar
Plugin URI: http://filipinasexdiary.com
Description: Companion plugin for the fsd theme. Enables calendar functionality.
Author: VD Bucks
Version: 1.0
Author URI: http://vdbucks.com
*/
THE HTML -----------------
<article class="post-885 post type-post status-publish format-status hentry category-uncategorized tag-hurricane-cloud-formation tag-hurricane-sandy tag-hurricane-sandy-clouds" id="post-885">
<figure>
<a href="http://filipinapussypatrol.com/author/trikepatrol/">
<img alt='John T Tourist' src='http://filipinapussypatrol.com/wp-content/uploads/2012/04/John-T-Tourist_avatar-78x78.jpg' class='avatar avatar-78 photo' height='78' width='78' /></a>
</figure>
END HTML -----------------
<?php
// on primary page
$content = 'test';
$template_file = 'weekly-view';
json_encode(array('content' => $content, 'template_file' => $template_file ));
?>
<?php