While investigating bobbingwide/fizzie/issues/28 I developed a fix for using the [bw_fields] shortcode to display the fields for the current post in an archive display.
If the id attribute value passed to the shortcode is . then the current post ID is used.
This overrides the is_single() checking that I'd implemented 5 years ago.
The code change was to add the last 3 lines in this extract:
I then found an alternative solution; use [bw_field] instead of [bw_fields].
I could use this because I did not need the field's prefix.
Requirement
Consider adding this as a possible solution to the second @TODO for the bw_metadata function
@TODO decide best way to deal with nested usage of this shortcode or multiple usage of this shortcode
* when the post we're trying to process is different from the main post.
* This happens when we are combining information from multiple posts into one output.
* Current solution is to not produce anything, not even 'Not single'
While investigating bobbingwide/fizzie/issues/28 I developed a fix for using the
[bw_fields]
shortcode to display the fields for the current post in an archive display. If theid
attribute value passed to the shortcode is.
then the current post ID is used. This overrides theis_single()
checking that I'd implemented 5 years ago.The code change was to add the last 3 lines in this extract:
I then found an alternative solution; use [bw_field] instead of [bw_fields]. I could use this because I did not need the field's prefix.
Requirement
Consider adding this as a possible solution to the second @TODO for the
bw_metadata
function