Title: Use shortcode with hooks
Last modified: October 15, 2020

---

# Use shortcode with hooks

 *  Resolved [Noche70](https://wordpress.org/support/users/noche70/)
 * (@noche70)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/use-shortcode-with-hooks/)
 * I need to add this shortcode using hooks.
 * if(is_single() && is_main_query()){
 *  $after = ‘[shortcode]’;
 *  //modify the incoming content
    $content = $content . $after;
 * This is not working.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Safeer](https://wordpress.org/support/users/safeerz/)
 * (@safeerz)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/use-shortcode-with-hooks/#post-13939522)
 * Sorry for the late reply,
 * Just in case if someone needs it, It should use
 * $after = do_shortcode(‘[rcblock id=”12345″]’);

Viewing 1 replies (of 1 total)

The topic ‘Use shortcode with hooks’ is closed to new replies.

 * ![](https://ps.w.org/reusable-content-blocks/assets/icon-128x128.jpg?rev=1957077)
 * [Reusable Content Blocks](https://wordpress.org/plugins/reusable-content-blocks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/reusable-content-blocks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/reusable-content-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/reusable-content-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/reusable-content-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/reusable-content-blocks/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Safeer](https://wordpress.org/support/users/safeerz/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/use-shortcode-with-hooks/#post-13939522)
 * Status: resolved