recipe shortcode

  • Unknown's avatar

    I used short code for recipe and recipe attributes and the short code appeared on the blog post rather than performing the task that it should have.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there!

    I see what you mean:

    http://musingsofamidwife.com/2014/02/16/good-food-good-family-great-memories/

    It looks like the formatting is a little off on your short code.

    Here’s what you have:

    recipe
    
    Lentil Soup Serves 8-10  Time: 2hr 30mins  Easy
    
    2 cups finely diced onion
    [...] Enjoy!
    
    recipe

    Here’s what it should look like:

    [recipe title="Lentil Soup" servings="8-10" time="2hr 30mins" difficulty="Easy"]
    
    2 cups finely diced onion
    [...] Enjoy!
    [/recipe]

    You can read more about how recipe short codes work here:

    http://en.support.wordpress.com/shortcodes/recipes/

    Let me know if I can help further with the short code formatting!

  • Unknown's avatar

    This is what I had originally. What you described above is what I did originally. Copied and pasted from the reference above into my post. When I saw that “the code” is actually what showed up in the post on the blog itself, I had to go back and delete it. Below is the text from the email i received after I made the first change. It shows the short code that I used originally.

    [recipe]
    [recipe]
    <img class=”alignnone size-medium wp-image-291″ alt=”IMG_0564″ src=”http://musingsofamidwife.files.wordpress.com/2014/02/img_0564.jpg?w=225″ width=”225″ height=”300″ /> <img class=”alignnone size-medium wp-image-291″ alt=”IMG_0564″ src=”http://musingsofamidwife.files.wordpress.com/2014/02/img_0564.jpg?w=225″ width=”225″ height=”300″ />
    [recipe title="Lentil Soup" servings="8-10" time="2hr 30mins" difficulty="easy"]
    [recipe title="Lentil Soup" servings="8-10" time="2hr 30mins" difficulty="easy"]

    2 cups finely diced onion 2 cups finely diced onion
    2 teaspoons celery seed 2 teaspoons celery seed
    chopped green onion chopped green onion
    In large stock pot combine all ingredients except toppings. Liquid should be just enough to cover your ham bone. Cover, bring to boil. Reduce heat to medium-low and continue to cook until lentils are tender and ham bone is falling apart and meat is coming off the bone, stirring occasionally (appox 2 hours). Remove ham bone and chop meat if necessary. Garnish soup with tablespoon of sour cream and chopped green onion. Enjoy! In large stock pot combine all ingredients except toppings. Liquid should be just enough to cover your ham bone. Cover, bring to boil. Reduce heat to medium-low and continue to cook until lentils are tender and ham bone is falling apart and meat is coming off the bone, stirring occasionally (appox 2 hours). Remove ham bone and chop meat if necessary. Garnish soup with tablespoon of sour cream and chopped green onion. Enjoy!
    [/recipe]

  • Unknown's avatar

    Okay. I see what happened. Because of the way the reference document is formatted, it added some extra tags when pasted into your post editor. So when I copied it into the Visual editor, this is what it looked like:

    But, if I take a look at my Text editor, this is what I see:

    Those extra ‘<.code>’ and ‘<./code>’ tags prevent the short code from working properly.

    Unfortunately a similar thing will happen if you copy directly from the code I gave you above as well. I’ll work on formatting that document so copying doesn’t break for people in the future. In the meantime, you can copy this and put it in your post. (You can put this in either your Visual or your Text editor):

    [recipe title="Lentil Soup" servings="8-10" time="2hr 30mins" difficulty="easy"]

    2 cups finely diced onion
    2 teaspoons celery seed
    2 tablespoons chopped garlic
    pepper to taste
    8 cups (2 quarts) chicken or vegetable stock
    bone from spiral ham
    1 pound green lentils

    toppings:
    sour cream
    chopped green onion

    In large stock pot combine all ingredients except toppings. Liquid should be just enough to cover your ham bone. Cover, bring to boil. Reduce heat to medium-low and continue to cook until lentils are tender and ham bone is falling apart and meat is coming off the bone, stirring occasionally (appox 2 hours). Remove ham bone and chop meat if necessary. Garnish soup with tablespoon of sour cream and chopped green onion. Enjoy!

    [/recipe]

    Sorry for the confusion! And thanks for reaching out! Let me know if copying that doesn’t work for you!

  • Unknown's avatar

    Thank you it worked :)
    I know copying and pasting is sometimes a bad idea but it is how I work most quickly lol I will look forward to that updated document!!
    Again,
    Thanks for your help

  • Unknown's avatar

    I’m so glad it worked! I updated the support document, so in the future you’ll be able to copy and paste from there.

    Let me know if I can help with anything else! :)

  • The topic ‘recipe shortcode’ is closed to new replies.