[wp-meta] [Making WordPress.org] #3645: Sponsors single page template should display featured image
Making WordPress.org
noreply at wordpress.org
Mon May 28 05:21:32 UTC 2018
#3645: Sponsors single page template should display featured image
-------------------------------------+--------------------
Reporter: tar.gz | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone:
Component: WordCamp Site & Plugins | Keywords:
-------------------------------------+--------------------
The current CampSite 2017 theme (v.1.0.0) isn't displaying featured images
for posts or pages.
There is one place where that's an issue: the "Sponsors" custom post type
(CPT), added through the `wc-post-types` plugin.
This CPT expects the sponsors logo to be added as the Featured Image. In
this way, it can be displayed via the sponsors shortcode.
This works fine whenever the shortcode is used – in a widget area, or a
main sponsors listing produced with the shortcode.
Example of sponsors listing created by the shortcode:
https://2018.europe.wordcamp.org/sponsors/
However, the actual "custom post type page" of the sponsor isn't rendered
with the shortcode, but with the single post template : template-
parts/content.php.
That explains why the logo doesn't show up here.
Example of single sponsor page, created by theme template, where to logo
is missing:
https://2018.europe.wordcamp.org/sponsor/bluehost/
This becomes a problem when a WordCamp site admin wants to link to those
single sponsor pages – it's an option in the shortcode, "link to the
sponsor’s post".
**Workarounds**
In that case, the site admin will probably add a second logo inside the
post content, in order to make it show up on the single page.
This will result in duplicate logos appearing where the shortcode is used.
This is currently being solved with CSS workaround, that hide the
duplicate logos on specific places.
**Proposed solution**
The optimal way would be to add a template for the "wcb_sponsor" CPT,
which would show the Featured Image.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3645>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list