Suppose I have content like
[xxx]
Here is some content in xxx
[/xxx]
Here is content outside xxx ...
Can I somehow just get
- content inside
[xxx]
ONLY - content outside
[xxx]
ONLY
Suppose I have content like
[xxx]
Here is some content in xxx
[/xxx]
Here is content outside xxx ...
Can I somehow just get
[xxx]
ONLY[xxx]
ONLYYou must be logged in to post a comment.
Depends on the shortcode. If you have access to the shortcode’s handler function, that function’s second argument is the content inside the shortcode:
For getting all content not in shortcodes, that’s easy.
strip_shortcodes()
does that:for example, will give you the content of the current post with only the content not inside shortcodes.