Pls how do we make player image url show in theme
solutionz 2 years ago in Player • updated by Andrei S. (Developer) 2 years ago • 7
Pls, from the theme we use, we realised that only the title of the post type Players is displayed in the theme as name of player.
Now we would like to to make the url of the player image to be visible also.
Customer support service by UserEcho
The plugin has special functionality to show the featured image on the archive page. It works fine with the most popular theme out of the box.
Your theme should use the "the_post_thumbnail()" function to render it. Ask theme support for help.
Thanks Andrei for taking time to look into this issue for me.
1. Does that mean that the other fields in players (the ones that show up in data import, as well as the player images/url) that do not show up are because of restrictions from my theme provider?
2. Is this different from this one (https://anwppro.userecho.com/en/communities/1/topics/693-can-we-assign-a-feature-image-to-player-post-type#comment-1691) here.
I really in love with your plugin and support services.
I had to add the code below to class-anwpfl-player.php
before the Players CPT itself showed in my theme. I also set url value to true
But all to no avail. I know these changes are not update proof, but that's all I could do for now.
Great that you have found the solution!
Try to remove the "rest_base" option (it will be "anwp_player" by default) and test. Let me know about the result.
1) No, it is impossible to add photos with Data Import.
2) No. As I understand from your description, you want to show photos on the archive page (with many players)
For example - https://football.anwp.pro/demo-core-public-1/player/
Is it correct?
In that topic https://anwppro.userecho.com/en/communities/1/topics/693-can-we-assign-a-feature-image-to-player-post-type#comment-1691
a customer wants to override the single-player page.
My theme provider, YoothemePro, has a dynamic content feature that allows one to map fields from a post type, including CPT to a template, sort of layout builder. This works the way mail merge works in Microsoft Office. So, after adding the rest api to players, I was expecting that fields like Fullname, Height, url for photo, Position etc to show up. However, only Title and Player link showed up.
My initial question therefore was about getting the url for the photo in Media to also show up for mapping. I thought that will be enough. Now I will like Positions and the other fields to also show up. I'm using a grid for the display.
If you don't mind, I can send you details in private so you can have first hand information by taking a look at my theme.
I hope you get me now.
Thank you so much.
I don't mind paying for premium support. Unfortunately, we are using this for only one football club otherwise we would have bought premium plugin.
Unfortunately, I don't plan to support such a type of theme with a non-standard rendering.
I recommend you switch to a regular WordPress theme.