Upload file list-posts.php via GUI
This commit is contained in:
26
Minecraft-Modern-Theme/list-posts.php
Normal file
26
Minecraft-Modern-Theme/list-posts.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
define('WP_USE_THEMES', false);
|
||||||
|
require('../../../wp-load.php');
|
||||||
|
|
||||||
|
$posts = get_posts(array(
|
||||||
|
'post_type' => 'mm_livestream',
|
||||||
|
'posts_per_page' => -1,
|
||||||
|
'post_status' => 'any',
|
||||||
|
));
|
||||||
|
|
||||||
|
echo "Gefundene Livestream Posts: " . count($posts) . "\n\n";
|
||||||
|
|
||||||
|
foreach ($posts as $p) {
|
||||||
|
echo "ID: {$p->ID}\n";
|
||||||
|
echo "Titel: {$p->post_title}\n";
|
||||||
|
echo "Status: {$p->post_status}\n";
|
||||||
|
|
||||||
|
$profile = get_post_meta($p->ID, '_mm_livestream_url', true);
|
||||||
|
$player = get_post_meta($p->ID, '_mm_livestream_player_url', true);
|
||||||
|
$owner = get_post_meta($p->ID, '_mm_livestream_owner', true);
|
||||||
|
|
||||||
|
echo "Owner: {$owner}\n";
|
||||||
|
echo "Profile: {$profile}\n";
|
||||||
|
echo "Player: {$player}\n";
|
||||||
|
echo "---\n\n";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user