treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Wordpress Query

  • Hey there.
    Im trying to pull in content from two different pages and display them on to a sidebar.

    What i was hoping was to display random content from two different pages into a sidebar, but only 3 in total.

    What i have is video and photo pages, and i would like to display 3 random thumbnails that also link to the video, basically act how they do on there main pages but displayed in the sidebar.

    Hope this makes a little sense :-/

    Can this be done in wordpress?

    B
  • I figured it out, by accident by still it works.

    I used the same template setup i had for calling the video's and changed the showposts amount to just one so it always loads the newest video. Not bad hey :)

    I did get stumped when it came to showing the sidebar on the pages i wanted as i have a php statement which was looking only at if it was the video home page and the video category i was extracting the videos from. What i had to do was change the names around for the pages i wanted the videos to appear on except the third page had to be the slug. Not sure why it wouldn't work just by calling the name. But hey its working.

    I will post the site once it has launched. And with approval of the clients.

    Cheers everyone

    B