Title: Code not working in published page
Last modified: August 16, 2023

---

# Code not working in published page

 *  Resolved [Preeti Razdan](https://wordpress.org/support/users/preetirazdan/)
 * (@preetirazdan)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/code-not-working-in-published-page/)
 * Hi, I have some HTML code that works fine and shows the image as intended when
   tested. But when I publish the page and copy-paste the code in HTML, the image
   does not display. Only links show up. I created this page for site visitors to
   be able to copy and paste the code. Please let me know how to fix this.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcode-not-working-in-published-page%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/code-not-working-in-published-page/#post-16978052)
 * I see several **YogChakra** logos with their link code below them.
 * Is this what you’re not seeing? Or something else?
 *  Thread Starter [Preeti Razdan](https://wordpress.org/support/users/preetirazdan/)
 * (@preetirazdan)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/code-not-working-in-published-page/#post-16978059)
 * I see the logo and the code. When I copy the code and run it in html tester, 
   it only shows the link. The code is designed to show the image link. Looks like
   double quotes get somehow corrupted when the page is published?! Maybe that is
   the problem?!
 *  [ren](https://wordpress.org/support/users/renyot/)
 * (@renyot)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/code-not-working-in-published-page/#post-16978154)
 * Hey there,
 * In the code you provided, I noticed that you used non-standard quotation marks.
   The correct one should be `"` instead of `”`.
 * Tested with below snippet and things worked correctly on my side.
 *     ```wp-block-code
       <a href="https://www.yogchakra.com/" target="_blank">
         <img src="https://www.yogchakra.com/wp-content/uploads/2023/08/yoga-directory-yogchakra-sq1.png" alt="YogChakra.com" border="0">
       </a>
       ```
   
 *  Thread Starter [Preeti Razdan](https://wordpress.org/support/users/preetirazdan/)
 * (@preetirazdan)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/code-not-working-in-published-page/#post-16978202)
 * I use ” but somehow when I publish the page they show up differently
 *  Thread Starter [Preeti Razdan](https://wordpress.org/support/users/preetirazdan/)
 * (@preetirazdan)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/code-not-working-in-published-page/#post-16978204)
 * I also get the correct result with the code you tested but like i said when I
   publish the page ” change to something else. I am using the wordpress editor
 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/code-not-working-in-published-page/#post-16978220)
 * Put the code inside a CODE block. Don’t just put the code in a paragraph block.
 *  Thread Starter [Preeti Razdan](https://wordpress.org/support/users/preetirazdan/)
 * (@preetirazdan)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/code-not-working-in-published-page/#post-16978278)
 * That worked! I usually find block editor hard to use and prefer classic editor.
   But I enabled block editor and the code works fine now. Is there a way to make
   it work in classic editor? Thank you so much for your help 🙂

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

The topic ‘Code not working in published page’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 7 replies
 * 3 participants
 * Last reply from: [Preeti Razdan](https://wordpress.org/support/users/preetirazdan/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/code-not-working-in-published-page/#post-16978278)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
