-
Hey! I know this can be a hard question but im wondering.
I’m currently fine-tuning my WordPress website, ScoreNord, which serves as a sports blog covering various categories such as basketball, baseball, soccer, and more. I’m seeking guidance on implementing a feature that aligns the content of the Featured Players sidebar with the selected category.
For instance, when a visitor clicks on the NBA category, I’d like the sidebar to dynamically display NBA players exclusively. Similarly, when the MLB category is selected, only MLB players should be showcased in the sidebar.
If I clicked this category https://i.postimg.cc/xd21Nmrh/image.png
Then only this player would show on the sidebar https://i.postimg.cc/yxw9tTxn/image.png
And the below player would not show because it belongs in another category.
Is it possible to do on GeneratePress? Thank you.
-
Hi there,
I tried to log into your site, but the user/password doesn’t work, can you check?
Questions for you: Is the
players
custom post type?If so, you can create multiple block element – sidebar, in the sidebar element, add a query loop block to display the custom CPT from certain category and assign the element to
category archive
>this specific category
. -
Hey
You should try the admin login again.
I don’t know excatly how my players would be custom post type?
I just put images onto the sidebar for demo purposes. How can I make them a custom post type.
Thank you
-
Hi there,
i cannot access that site either with the login provided.
And it would be good to see the site so we can understand where things currently stand -
Hi!
The user admin should work this time.
This is what the site looks like as of now https://i.postimg.cc/dt3wJjcp/image.png
-
So you manually added the player image to the sidebar? if you are ok with the manual work, then no, you do not need to create a custom post type for players.
The same as I replied before, you can create multiple block element – sidebar, and assign different element to different categories.
-
Yes I added the pictures manually but I would love to know how to do the more automated method. Where should I start?
-
What purpose do the images have ?
eg. is it just to show the picture or will they have titles and links to their own posts.If you need more content then each player needs to be saved as a post.
A simply option is to use the regular Posts, and give it a Category ( or Tag ) ofPlayer
or some such term that will allow those be to queried independently , they can still have other Terms such asNBA
to a associate them with the relevant archives. -
Ah, okay I am starting to understand now. I intend to buy sports API in the future which could possibly link the analytics straight to the sidebar next to the players. Although I need to look into it more. This answer was amazing. Thank you!
-
You’re welcome
- You must be logged in to reply to this topic.