• Resolved James Hunt

    (@bonkerz)


    Hey man, great plugin and thanks for taking initiative to replace P2P

    I noticed your 3rd demo code for the plugin ('posts_per_page' = 5) throws back the error – Parse error: syntax error, unexpected '=', expecting ')'

    I’m struggling with getting the code working on multiple pages (inserting $id instead of manually writing the post ID) – any tips?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author neatek

    (@neatek)

    hello,

    <?php
        $args = array(
            'posts_per_page' => 5
        );
        $c_posts = npc_get_connected($id, 'needed_post_type', $args);
        var_dump($c_posts);
    ?>

    or just without $args

    
        $c_posts = npc_get_connected($id, 'needed_post_type');
        var_dump($c_posts);
    
    • This reply was modified 7 years, 5 months ago by neatek.
    • This reply was modified 7 years, 5 months ago by neatek.
    Plugin Author neatek

    (@neatek)

    No answer from bonkerz. Solved

    • This reply was modified 7 years, 5 months ago by neatek.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Example Code’ is closed to new replies.