• AI Blog Title Generator

    Posted by Moiz Saifuddin on April 15, 2025 at 6:09 pm

    Hi Hasan,

    I have watched this video of yours to build a AI Blog Title Generator through wordpress and have followed all your instructions but I am getting the oops error message when I click on the generate title button. I have changed all the urls to match my local wordpress site but still am facing an error message..

    Hasan replied 4 days, 3 hours ago 3 Members · 14 Replies
  • 14 Replies
  • Hasan

    Administrator
    April 16, 2025 at 11:24 am

    Did you set the LLM API key?

    • Moiz Saifuddin

      Member
      April 16, 2025 at 2:00 pm

      Yes I set the API key and I checked the response in the developer tools in the browser and there is no data retrieved. I get this error message “Oops! Something went wrong. Please try again.”

      • Hasan

        Administrator
        April 16, 2025 at 4:52 pm

        Test it without the UI, like an API call, and check if it works

  • Moiz Saifuddin

    Member
    April 16, 2025 at 10:41 pm

    could you please recommend a site for this and the arguments and method involved

  • Moiz Saifuddin

    Member
    April 16, 2025 at 11:19 pm

    I have used postman and as you see there is a api key I am using to pass into the api but I am getting no data

  • Moiz Saifuddin

    Member
    April 18, 2025 at 8:17 pm

    In the code snippet there is a variable, jsonData . I dont see any assignment to this variable and it is being passed on to functions, even though its empty

  • Hasan

    Administrator
    April 24, 2025 at 4:54 am

    sorry, you are testing google gemini here, I mean test your wordpress endpoint

  • Moiz Saifuddin

    Member
    May 7, 2025 at 7:27 pm

    Hi, This error was resolved, I used shortcut code to call the plugin from the page directly and had all html code saved in php plugin code and received a response.

    • Hasan

      Administrator
      May 8, 2025 at 2:59 pm

      Glad to hear that your problem is solved!

    • Ifeoluwa Afolayan

      Member
      June 8, 2025 at 1:45 pm

      how did you solve it?

    • Ifeoluwa Afolayan

      Member
      June 8, 2025 at 2:16 pm

      I followed all the instructions in theWordpress with Gemini Youtube video, I got this error. i don’t know why the error is happening. Pls help

      • Hasan

        Administrator
        June 9, 2025 at 2:10 pm

        which tutorial exactly you are following?

        can you share your code and what you are trying to do

        • Ifeoluwa Afolayan

          Member
          June 12, 2025 at 6:22 pm

          Thank you, Hasan.

          I watched your video on creating AI tools with Gemini and WordPress.

          The AI tool is free blog title generator, I used the Front end code and backend code you used as example, but I it did not work.

          I can’t paste the code here its very long, but I can link to the page

          Front end – https://learnwithhasan.com/custom-code/ai-tool-on-wordpress-ui/

          Backend – https://learnwithhasan.com/custom-code/ai-tool-on-wordpress-with-gemini/

          I used the HTML widget on the front-end side to insert the exact UI code you provided.

          I used the insert code snippet plugin for the PHP backend code.

          I replaced the Gemini API key with mine

          I also replace the Ajax code “fetch(‘http://wordpress-test.local/wp-admin/admin-ajax.php'” with mine URL

          I followed exactly what you did in the video, but I got the error “Oops! Something went wrong. Please try again.

          pls help!!

  • Hasan

    Administrator
    June 13, 2025 at 3:23 pm

    can you please test the endpoint you created without the UI, just using postman or any API tester, to check first if the problem is in the backend or frontend

Log in to reply.