How to auto-create pages from an API with JavaScript on a WordPress site?

Tagged: ,

This topic contains 0 replies, has 1 voice, and was last updated by  sireesha 2 weeks, 4 days ago.

  • Author
    Posts
  • #16500
     sireesha 
    Participant

    Hi,
    I’m utilizing an API in JSON organization to show the standings of games groups in a class. Here’s a case of the JSON information I’m working with:

    { “data”:[
    {
    “position”:1,
    “team_id”:53,
    “team_name”:”Celtic”,
    “group_id”:null,
    “group_name”:null,
    “overall”:{
    “games_played”:25,
    “won”:18,
    “draw”:6,
    “lost”:1,
    “goals_scored”:54,
    “goals_against”:17
    },
    “home”:{
    “games_played”:13,
    “won”:9,
    “draw”:4,
    “lost”:0,
    “goals_scored”:30,
    “goals_against”:8
    },
    “away”:{
    “games_played”:12,
    “won”:9,
    “draw”:2,
    “lost”:1,
    “goals_scored”:24,
    “goals_against”:9
    },
    “total”:{
    “goal_difference”:”+37″,
    “points”:60
    },
    “result”:”Promotion – Premiership (Championship Group)”,
    “points”:60,
    “recent_form”:”WWWDW”,
    “status”:”same”
    }
    ]}

    I have an approach to relate the team_ID with particular group information from the API. What I’m attempting to do is to make the groups in my Standings tables interactive, so when the client taps on a group, they can go to a page where I show information for that particular group (the data would, obviously, be removed from the API). Presently, I’m building up the site over WordPress, and I’m thinking about how I can auto-create pages for each group, with the goal that site clients can go to particular group pages straightforwardly from the Standings tables.

    It’s not helpful for me to physically make pages with a bit of code and transfer them to the FTP server for each group, in light of the fact that there’ll be such a large number of groups (in the end a huge number of groups), and it’s certainly not achievable.

    Would anyone be able to please control me while in transit to auto-make pages for the groups so my group joins don’t return 404 Not Found pages? A critical point is that I’m utilizing JavaScript to control the information.

    I’m utilizing the team_id property in the API to make my group joins, however, I wear’ know how to utilize my team_id to naturally make group pages on my WordPress site.

    Thanks and Regards
    Sireesha.

    • This topic was modified 2 weeks, 4 days ago by  sireesha.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

©2018 A Venture by Megri Soft Limited a 23 year old Web Company in Chandigarh

Log in with your credentials

or    

Forgot your details?