[wp-trac] [WordPress Trac] #60852: Block Templates: Make conditional tags work when processing content for REST API

WordPress Trac noreply at wordpress.org
Thu Mar 28 15:43:06 UTC 2024


#60852: Block Templates: Make conditional tags work when processing content for
REST API
-----------------------------+-----------------------------
 Reporter:  Bernhard Reiter  |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+-----------------------------

Comment (by Bernhard Reiter):

 Note that getting
 [https://developer.wordpress.org/reference/functions/is_singular/
 `is_singular()`] to work would allow users to inject a hooked block only
 when the current template is for a custom post type (e.g. `if (
 is_singular( 'book' ) ) { /* ... */ }`), which seems to be a recurrent
 request.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60852#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list