Getting the featured image and links of the last 5 posts
-
Hello all;
I am using the Bauhaus theme for a site (now being tweaked on a test install)that will be used by many writers with limited WP knowledge. The theme has a beautiful slider for 5 images but I have a problem: I want it to pull the summary, featured image and link from the last 5 posts. As it is, the links and images of the slider need to be places manually, as well as the text.
Today, these are the lines of code that define text, link and images for the slider (they are on functions.php and they are replicated 5 times, one for each slot:
array( "name" => "First slide settings", "type" => "title"), array( "name" => "Image Location url", "desc" => "Enter the url of the first image to use in the slider.", "id" => $shortname."_image1_url", "std" => "https://a.elkind.net/wp-content/themes/bauhaus/images/1.jpg", "type" => "text"), array( "name" => "Slide Target link", "desc" => "Enter the url you want the visitor to be taken to when clicked.", "id" => $shortname."_slide1_url", "std" => "https://a.elkind.net/bauhaus/", "type" => "text3"), array( "name" => "First Slide Caption", "desc" => "Enter the text of the first slide caption.", "id" => $shortname."_slide1_caption", "std" => "Bauhaus, was a school in Germany that combined crafts and the fine arts, and was famous for the approach to design that it publicized and taught.", "type" => "text5"),
I imagine that it is possible to get this data automatically, but I have no knowledge to do something so sophisticated.
Can one of you offer some help, please?
Thanks a lot in advance
- The topic ‘Getting the featured image and links of the last 5 posts’ is closed to new replies.