Title: layladecorly's Replies | WordPress.org

---

# layladecorly

  [  ](https://wordpress.org/support/users/layladecorly/)

 *   [Profile](https://wordpress.org/support/users/layladecorly/)
 *   [Topics Started](https://wordpress.org/support/users/layladecorly/topics/)
 *   [Replies Created](https://wordpress.org/support/users/layladecorly/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/layladecorly/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/layladecorly/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/layladecorly/engagements/)
 *   [Favorites](https://wordpress.org/support/users/layladecorly/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [How can I display thumbnails and their respective categories in a WordPress menu](https://wordpress.org/support/topic/how-can-i-display-thumbnails-and-their-respective-categories-in-a-wordpress-menu/)
 *  [layladecorly](https://wordpress.org/support/users/layladecorly/)
 * (@layladecorly)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/how-can-i-display-thumbnails-and-their-respective-categories-in-a-wordpress-menu/#post-16790496)
 * **to display thumbnails and their respective categories in a WordPress menu I
   created a code for this.**
 * // Add Thumbnail Support to Categories
   function wpse_category_thumbnail( $menu_item,
   $category ) {if ( isset( $category->term_id ) ) {$thumbnail_id = get_term_meta(
   $category->term_id, ‘thumbnail_id’, true );if ( $thumbnail_id ) {$image = wp_get_attachment_image(
   $thumbnail_id, ‘thumbnail’ );$menu_item = ‘term_id ) ) . ‘”>’ . $image . ” . 
   $category->name . ‘‘;}}return $menu_item;}add_filter( ‘walker_nav_menu_start_el’,‘
   wpse_category_thumbnail’, 10, 2 );
 * This code is 100% working and I’m still using it on [Glitch Text Generator](https://textgoo.com/glitch-text-generator/).
   Please add the above-mentioned code to your theme’s functions.php file.
 * Please note that depending on your theme’s styling, you may need to modify the
   CSS to ensure the thumbnails are displayed properly within your menu.[](https://wordpress.org/support/users/titan33llb/)
    -  This reply was modified 2 years, 11 months ago by [layladecorly](https://wordpress.org/support/users/layladecorly/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Compliance by Hu-manity.co] WP Rocket Caching Conflict](https://wordpress.org/support/topic/wp-rocket-caching-conflict/)
 *  [layladecorly](https://wordpress.org/support/users/layladecorly/)
 * (@layladecorly)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/wp-rocket-caching-conflict/#post-16790489)
 * Thank you for sharing your experience and solving the conflict between the Cookie
   Notice plugin and WP Rocket’s ‘Remove Unused CSS’ function. It’s helpful to know
   that adding the exclusion URL in WP Rocket can resolve the issue. Your post will
   undoubtedly assist others who may encounter the same problem. We appreciate your
   contribution to the community!
   The same error I was facing on [https://textgoo.com](https://textgoo.com)
   and here’s the code which would help you
 * add_filter(‘rocket_cache_reject_uri’, ‘custom_disable_rocket_cache_migration’,
   10, 1);
   function custom_disable_rocket_cache_migration($reject) {if (defined(‘
   WP_CLI’) && WP_CLI && isset($_SERVER[‘REQUEST_URI’]) && strpos($_SERVER[‘REQUEST_URI’],‘/
   wp-admin/admin-ajax.php’) !== false) {$reject = true;}return $reject;}
    -  This reply was modified 2 years, 11 months ago by [layladecorly](https://wordpress.org/support/users/layladecorly/).

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