• cemetil

    (@cemetil)


    So what I am trying to achieve is following:

    I want to define shortcodes (like [gallery]) for my blog, and want to use them instead of writing the text manually.

    Let’s say I am writing about Cars… I have a new post about a Volvo, I add some pictures, write [Volvo] in the editor and maybe some extra text. As outcome I would like to have the pre-defined short Volvo history below my picture.

    Therefore I could asign shortcodes to all brands ([Volvo][VW][Mercedes]…) and could use them anywhere in the post to give that short history information about that brand without writing it everytime manually.

    After trying some shortcode plugins which did not work as i had imagined I tried to do it with the Custom Field. I defined a Custom Field for each post and it worked !! 🙂

    BUT! : (Yeah I know, there ‘s always a but)
    This time the shortcode (or Custom Field tag) works ONLY in the post. I am using the excerpt on the homepage and also on a different loop (for example http://www.brandcars.com/volvo/ which would show all posts with volvo cars) but these do not show the Custom Field? There it is only shown as [Volvo] again?

    Could anyone please let me know if I am on the right path, or there is an easier solution to this? Maybe I would have to add the the_meta() somewhere else in the loop?

    Thanks in advance for any help or suggestion…

  • The topic ‘Shortcodes in Loop’ is closed to new replies.