Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template for displaying all pages.
- *
- * This is the template that displays all pages by default.
- * Please note that this is the WordPress construct of pages
- * and that other 'pages' on your WordPress site will use a
- * different template.
- *
- * @package testes
- * @since testes 1.0
- */
- get_header(); ?>
- <div id="primary" class="content-area">
- <div id="content" class="site-content" role="main">
- <h2>PRINT POST TYPE releases </h2>
- <?php
- echo "LANGUAGE: " . ICL_LANGUAGE_CODE . "<br>";
- echo "<br><br><b>USING QUERY POSTS:</b><br><br>";
- while ( have_posts() ) : the_post();
- $args=array(
- 'post_type' => 'releases',
- 'posts_per_page' => -1
- );
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() ) {
- while ($my_query->have_posts()) : $my_query->the_post();
- echo "NAME: " . get_the_title() . "<br>";
- echo "CONTENT: " . get_the_content() . "<br>";
- endwhile;
- }
- echo "<br><br><b>USING PODS2.0:</b><br><br>";
- $params = array('limit' => -1);
- $mypod = pods( 'releases', $params );
- $mypod->find($params);
- while ($mypod->fetch()) {
- $name = $mypod->display('name');
- $id =$mypod->display('ID');
- $relation =$mypod->display('rel_title');
- $content =$mypod->display('content');
- echo "ID: " . $id . "<br>";
- echo "NAME: " . $name . "<br>";
- echo "RELATION: " . $relation . "<br>";
- echo "CONTENT: " . $content . "<br>";
- echo "<br>#####<br>";
- }
- endwhile;
- ?>
- </div><!-- #content .site-content -->
- </div><!-- #primary .content-area -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement