Title: No Cache on shortcode
Last modified: November 10, 2023

---

# No Cache on shortcode

 *  [laellou](https://wordpress.org/support/users/laellou/)
 * (@laellou)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/no-cache-on-shortcode/)
 * Hello I used to use the content no cache plugin on my sso shortcode “my account”/“
   login” button, it worked very well until your last update, but since then it 
   doesn’t work anymore, instead of displaying my sso login link, it displays an
   infinite loading wheel, this is not visible on the page because I added my sso
   shorcode directly so as not to block users, but the button is now cached so I
   can no longer disconnect once connected
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fno-cache-on-shortcode%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/no-cache-on-shortcode/#post-17191672)
 * Hi [@laellou](https://wordpress.org/support/users/laellou/),
 * do you mean the “Me Connecter” that you have in the main navigation?
   If you mean
   that link for me it’s strange that it was working before.Are you sure it’s because
   of the update of Content No Cache, or because of the update of the WordPress 
   core or another plugin?
 * That link would work if you can do shortcodes inside the navigation. As a default
   WordPress doesn’t do it, and in Content No Cache no version before had code to
   enable shortcodes in the navigation. At least, if I’m not missing something.
 * In any case, you can make it work by adding this code to the functions.php of
   your child theme, or to a functional plugin:
 *     ```wp-block-code
       add_filter('wp_nav_menu_items', function( $items ){
       	$content_no_cache_id = 2837; // Replace this ID with the ID of your Content No Cache element.
       	$items = str_replace( '<a href="#">[content_no_cache', '[content_no_cache', $items );
       	$items = str_replace( ' id=' . esc_attr( $content_no_cache_id ) . ']</a>', ' id=' . esc_attr( $content_no_cache_id ) . ']', $items );
       	return do_shortcode( $items );
       } );
       ```
   
 * Replace 2837 with the ID of your Content No Cache shortcode.
 * I hope it helps.
 * Have a great day!
 * Jose
 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/no-cache-on-shortcode/#post-17191679)
 * I forgot. You need to put the shortcode in the Navigation Label, e.g. [content_no_cache
   id=2837], and the symbol # in the URL when you edit the menu item.
 * [@laellou](https://wordpress.org/support/users/laellou/)
 *  Thread Starter [laellou](https://wordpress.org/support/users/laellou/)
 * (@laellou)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/no-cache-on-shortcode/#post-17299535)
 * Hi, yes I speak about this button, and yes I am certain, it was working, I have
   downgrade the plugin and evrything works fine, but it is broken if I update it.
   
   The shortcode is directly use on the WordPress code of the header, I dont need
   to add another plugin or your piece of code with the version before the last 
   version.
    -  This reply was modified 2 years, 9 months ago by [laellou](https://wordpress.org/support/users/laellou/).

Viewing 3 replies - 1 through 3 (of 3 total)

 The topic ‘No Cache on shortcode’ is closed to new replies.

 * ![](https://ps.w.org/content-no-cache/assets/icon-256x256.png?rev=2687570)
 * [Content No Cache | Serve uncached partial content even when you add it to a page that is fully cached.](https://wordpress.org/plugins/content-no-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/content-no-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/content-no-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-no-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-no-cache/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [shorcode](https://wordpress.org/support/topic-tag/shorcode/)

 * 3 replies
 * 2 participants
 * Last reply from: [laellou](https://wordpress.org/support/users/laellou/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/no-cache-on-shortcode/#post-17299535)
 * Status: not resolved