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

  • SEARCH
  • Home
  • 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 8401677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:52:10+00:00 2026-06-09T21:52:10+00:00

I am having issues while trying to build up a following query in WordPress

  • 0

I am having issues while trying to build up a following query in WordPress using the tag_id as a filter:

    <?php 
        $the_query = new WP_Query( array ( 
        'posts_per_page' => '-1', 
        'tag_id' => '' 
        ) );
        while ( $the_query->have_posts() ) : $the_query->the_post();
    ?>

As you can see, the “tag_id” value is empty because I am trying to retrieve the value from here:

        <?php echo of_get_option('slideshow-tags', 'no entry' ); ?>

This echo is returning a value so it works but I don’t know how to adapt this to the query without getting php errors.

I tried:

    <?php 
        $the_query = new WP_Query( array ( 
        'posts_per_page' => '-1', 
        'tag_id' => 'echo of_get_option('slideshow-tags', 'no entry' );             '
        ) );
              while ( $the_query->have_posts() ) : $the_query->the_post();
    ?>  

but it won’t work.

  • 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-09T21:52:12+00:00Added an answer on June 9, 2026 at 9:52 pm

    You don’t want to echo the returned value of of_get_option, you want to use it in your array:

    $the_query = new WP_Query(array( 
        'posts_per_page' => -1, 
        'tag_id' => of_get_option('slideshow-tags', 'no entry')
    ));
    
    // Now just do the loop...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey I am having some issues while using Nggalley plugin for wordpress the plugin
I am having the following two issues: 1) While I am trying to pull
I'm having issues while populating a combobox using DirectStore, the combobox is as follow:
I am working with a MySQL Database and having some issues while trying to
I am having issues matching a string using regex in javascript. I am trying
I am having this issue, but while trying to fix it as per the
Im having an issue when im trying to read in a text file while
I'm having memory issues while reading video frames from an existing video chosen from
Am having issues with printing different sized PDF's using GhostScript (V9.05). The PDF in
I've been trying to learn GWT for quite a while, I want to build

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.