Title: WordPress Logic Example
Last modified: March 5, 2019

---

# WordPress Logic Example

 *  [rysaroni](https://wordpress.org/support/users/rysaroni/)
 * (@rysaroni)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/wordpress-logic-example/)
 * Would someone possibly be able to post an example of how we would reference the
   code using wordpress logic?
 * I’ve tried adding it the same way I would with a post (where it works) and it
   does absolutely nothing.

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

 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/wordpress-logic-example/#post-11275917)
 * Hi,
 * Okay, here’s an example of using it…
 * * Scroll down to “Custom Fields” and add CODE1 as a field name and then add “
   <p>Hello World!</p>” (without quotes) as the field value. Save that.
    * In your
   post content add, wherever you like, %CODE1%
 * Now, when you view your post, where you added %CODE1%, it should now add the “
   Hello World” line instead.
 *  Thread Starter [rysaroni](https://wordpress.org/support/users/rysaroni/)
 * (@rysaroni)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/wordpress-logic-example/#post-11277031)
 * I actually was referring to the plugin “WordPress Logic” that allows you to use
   this with a widget. Thanks!

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

The topic ‘WordPress Logic Example’ is closed to new replies.

 * ![](https://ps.w.org/simple-embed-code/assets/icon.svg?rev=3073981)
 * [Code Embed](https://wordpress.org/plugins/simple-embed-code/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-embed-code/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-embed-code/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-embed-code/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-embed-code/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-embed-code/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [rysaroni](https://wordpress.org/support/users/rysaroni/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/wordpress-logic-example/#post-11277031)
 * Status: not resolved