Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

->total() = 0

$
0
0

Replies: 0

hi guys,
i’am really new to wp and of course also to pods. i just created a cpt called layout, added a filed called header and then aaded a new layout layout1.
i also created my first theme with a simple index.php:

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta charset="<?php bloginfo('charset'); ?>">
        <?php wp_head(); ?>
    </head>
    <body>
        <pre>
        <?php
        $layouts = pods('layout');
        echo $layouts->total()>0?"Y":"N";
        while ($layouts->fetch()) {
            print_r($layouts->display('header'));
        }
        ?>
        </pre>
    </body>
</html>

but there is no fetch-result, total is zero!
what did i miss?
thx in advance!


Viewing all articles
Browse latest Browse all 59525

Trending Articles