Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:11:45+00:00 2026-06-10T04:11:45+00:00

Hi I am trying to instegrate a slider into my wordpress theme.This is what

  • 0

Hi I am trying to instegrate a slider into my wordpress theme.This is what I have so far:

<?php 
                            $slider_query = new WP_Query(array(
                                        'posts_per_page'=>'5'
                            ));

                            if($slider_query->have_posts()):
                                while($slider_query->have_posts()):
                                    $slider_query->the_post();
                                        if(function_exists('has_post_thumbnail') && has_post_thumbnail()){
                                            the_post_thumbnail();
                                        }
                                 endwhile;
                            endif;

?>

While this does work and retrieves the image I need to be able to retribe the url because I have to set different title attributes that are stored for the caption.

Anyone know of a way to retrieve the thumbnail url?

EDIT: I have also tryed to get the URL using

$url = wp_get_attachment_image_src(the_post_thumbnail());

But for som reason the query returns 10 links img’s and I set it to 5 only.Wierd thing is that the even images have no source.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:11:46+00:00Added an answer on June 10, 2026 at 4:11 am

    Try using wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'wanted-size' );. (replace wanted-size with the correct size).

    More on get_post_thumbnail_id here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently trying to integrate mandrill into this Django-based website for emails. Djrill
I am trying to integrate some OpenCV functionality into my application. Currently I have
Hi I'm trying to convert the XML file into associative array by using the
trying to integrate hibernate and spring ,I ran into this error SEVERE: Context initialization
I have a problem. I'm trying to integrate jQuery address http://www.asual.com/jquery/address/ into my website.
I'm trying to integrate Coin Slider into my page, and I've downloaded and attached
I'm trying to integrate Facebook sharing into a webpage using this code edited from
I am trying to integrate SWFUpload into Joomla (customized implementation, and this is why
I am trying to integrate Facebook into my app and have already implemented MGTwitterEngine
I'm trying to integrate passport into my nodejs server using connect, but can't seem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.