View Single Post
Old 02-23-2016, 02:16 AM  
stoka
Confirmed User
 
stoka's Avatar
 
Join Date: Dec 2005
Posts: 956
get tag_ID for filipina sex by going mouseover that category in wp admin. It's a number

here below is a version where you submit tag_ID through form
slightly adapted Zerovic's code

Code:
<?php
include('wp-load.php');
$args = array(
	'cat'     	=> $_POST['tag_id'],
	'showposts=' 	=> $_POST['number']
);

if($_POST['number']) {
query_posts($args);
while (have_posts()) : the_post();

if($_POST['order_1'] == "url") {
echo the_permalink();
}
if($_POST['order_1'] == "title") {
echo get_the_title();
}
if($_POST['order_1'] == "description") {
echo get_the_content();
}

if($_POST['order_1'] != "none") { if($_POST['separator'] == "tab") { echo "\t"; } else { echo $_POST['separator']; } }

if($_POST['order_2'] == "url") {
echo the_permalink();
}
if($_POST['order_2'] == "title") {
echo get_the_title();
}
if($_POST['order_2'] == "description") {
echo get_the_content();
}

if($_POST['order_2'] != "none") { if($_POST['separator'] == "tab") { echo "\t"; } else { echo $_POST['separator']; } }

if($_POST['order_3'] == "url") {
echo the_permalink();
}
if($_POST['order_3'] == "title") {
echo get_the_title();
}
if($_POST['order_3'] == "description") {
echo get_the_content();
}

echo "<br />";

endwhile;

} else {

echo "<form method=\"post\">";
echo "<label>Tag_ID</label> <input type=\"text\" name=\"tag_id\" /><br />";

echo "<form method=\"post\">";
echo "<label>Number Of Posts</label> <input type=\"text\" name=\"number\" /><br />";

echo "<label>Order</label> <select name=\"order_1\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select>";

echo "<select name=\"order_2\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select>";

echo "<select name=\"order_3\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select><br />";

echo "<label>Separator</label> <select name=\"separator\"><option value=\"|\">|</option><option value=\"tab\">TAB</option><option value=\";\">;</option><option value=\":\">:</option></select>";

echo "<input type=\"submit\" value=\"export\" />";
echo "</form>";
}
?>
stoka is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote