1

I have tried many hooks trying to manipulate the processed content coming from of all the shortcodes, customize it, and output the final result on the pages

I have no idea what shortcodes are, so I would like to execute a filter or something that works on every shortcode

How this can be done?

1

so I would like to execute a filter or something that works on every shortcode

Looks like you're after do_shortcode_tag. It "Filters the output created by a shortcode callback.".

Aurovrata Venet gives a demo usage similar to:

add_filter( 'do_shortcode_tag',function ($output, $tag, $attr){

  //make sure it is the right shortcode
  if('aShortcode' != $tag){ 
    return $output;
  }

  //you can even check for specific attributes
  if(!isset($attr['id'])){ 
    return $output;
  }

  $output .= '.. do somthing ..';

  return $output;
},10,3);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.