• Resolved evilpupil

    (@evilpupil)


    hi, i’m not good with php so please bare with me. i got problem with my coding. i try to use a custom variable in a get_post function, but it’s not working.

    example:

    <?php $testa = 5 ;?>
    <?php $testb = 10 ;?>

    <?php $posts = get_posts(‘numberposts=$testa&offset=$testb‘); foreach ($posts as $post) : start_wp(); ?>

    but only the $testa is called correctly in numberposts but not the $testb. how can i fix this?

    please help
    thank you

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘offset’ is closed to new replies.