Indexing only attributes from shortcodes
…do I go about this? – Duke at Remove shortcode but keep content in X parameter You can’t do this using the Relevanssi shortcode removal because that’s a binary operation: the whole shortcode is kept or removed, and there’s no way to keep only part of the shortcode. However, you…I need to add some custom shortcodes to the list of the “removed” ones (so they don’t show in plain text in the results). However, some of them are built like [shortcode_name text=”Need to keep this in results”] and I would like the content in the text parameter to stay in the results. How……the “text” attribute from the shortcode * * @param string $content Post content * * @return string Post content with the shortcode replaced with just the “text” attribute content. */ function rlv_shortcode_attribute( $content ) { return preg_replace( ‘/\ /im’, ‘\1’, $content ); } Since this particular case was about a…