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 6964443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:55:30+00:00 2026-05-27T15:55:30+00:00

I have try to get answer from WordPress Answer but instead of getting answer

  • 0

I have try to get answer from WordPress Answer but instead of getting answer I earn Thmbleweed badge. 🙁 anyways so I am trying here and hopping solution.

My new website going to have multiple author. All I need to do with that some specific system where Admin can add banner to the specific author’s post.

Fore example xxx banner will only display on xyz author’s post and not on any other author post. Which will have auto expiry system, it will automatically invisible when it reach to defined date by admin. All these systems will be under admin control only.

I am not php guy but can play with wordpress codes a bit. So I need really great help to work this out. I also won’t mind to give full credit on my website credit display for this system.

  • 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-05-27T15:55:31+00:00Added an answer on May 27, 2026 at 3:55 pm

    Create a table with fields:id, authorid, banner_content, expiry_date.

    To fill in the table with specific details of authorid,
    banner_content, expiry_date create a simple form or directly enter in
    the database.

    After your table is created and is filled with details

    HERE IS THE COMPLETE CODE TO DISPLAY THE BANNER

        <?php 
        $getid = $posts[0]->post_author; //No need to change this
        $sql= "SELECT * FROM bannertable wbanner WHERE author_id = $getid AND expiry_date>CURDATE();"; //change the table name 'bannertable' and field names 'author_id' and 'expiry_date' to your own
        $banner_con=$wpdb->get_results($sql);
        echo "<div class='banner'>";
        foreach ( $banner_con as $content ) 
        {
            echo $content->banner; //change field name 'banner'.
        }
        echo "</div>
        ?>
    

    Make sure to enter the above code inside the loop of your theme.

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

Sidebar

Related Questions

So I have been asking questions here trying to get the answer for myself
I have wanted to try GAE since launch, but coming from ASP .NET and
Based on this answer Get the subdomain from a URL , I am trying
I have a WPF ComboBox named cbFileSize. I try to get is selected value
I have been through every option to try to find a way to get
I have a get-parameter with name controller . When I try to pass it
If I try to get image data from a canvas that has an image
i asked this question before but haven't been able to get an answer.. i
actually i was opened question previously, but can't get answer what i exactly want,
I've asked this question before but couldn't get the answer I was looking for

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.