Hi i’ve been working on trying a basic webpage design that I want to display the top 5 blogs and videos from my site on the homepage. Currently the blog section and the video section are all working independently in their categories however I have trouble coding these two seperate elements to play nicely on the homepage.
Currently I am trying to test out if I can even get the content by ID before I begin worrying about getting it to display on the page.
the code I currently have looks something like this
<?php
$posts = get_posts();
$videos = get_videos();
$check_id = $posts && $videos
$omit = $check_id - 5
$top5= $check_id - $omit
echo $top5;
?>
this code will give me the number 5 but I need it to return the actual physical content, just the latest 5 post and videos. Im very much a n00b at php and any assistance would be greatly apprectiated