Adding Shortcodes To The Theme

Homepage Community Forums Epik Theme Support Adding Shortcodes To The Theme

  • This topic has 3 replies, 2 voices, and was last updated 11 years ago by Wes.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4082
    Dave
    Customer

      Hello

      I’m new to Genesis and this way of working with code snippets as I’m used to using shortcodes on the themes I’ve used in the past

      Is there a way I can add a function into the theme to render the code snippets into my post by use of a shortocde?

      I’m not a coder so all this swapping between html mode and text mode in the editor makes my head spin and sometimes the html that’s added is lost as soon as I switch back to text mode…

      I prefer a visual way of working, so shortcodes for things like columns and boxes etc are my preferred way of doing things.

      So if I can find out how to add this system once (i’ll put up with the needed code to do it)

      In summary… If I can use some shortcodes instead of having to copy paste blocks of code whenever I want a box etc adding then it will be a great help!

      Thanks!

      Dave

      #4097
      Wes
      Moderator

        We don’t really add shortcodes to themes, mainly because of the issues you would run into if you switched your theme. Here is a well known post in the WordPress community that explains what I’m talking about – http://justintadlock.com/archives/2011/05/02/dealing-with-shortcode-madness ….(you may already know about this, I just wanted to add it just in case)

        It’s actually better to use a plugin when adding shortcodes. I did a quick Google search and came across a few –

        http://wordpress.org/extend/plugins/genesis-shortcodes/

        http://wordpress.org/extend/plugins/column-shortcodes-for-genesis/

        If you want to create your own shortcodes, you could take a look at any of these tutorials, just make sure you keep the code that you create separate or have it organized in a way that you can easily transfer it if you ever want to change your theme.

        #4107
        Dave
        Customer

          Thanks for the links Wes…

          Interesting discussion on the blog post. I don’t entirely agree with the stance about ‘lock-in’ as most theme designers add the shortcodes to give their customers the design features and layout in the easiest way possible. ie without needing HTML knowledge… If someone decides to swap themes, then they will have to deal with the consequence… (I’m having to deal with this as part of the changeover to your theme and I was fully aware of what I  was gonna be faced with)

           

          As  I say I’m new to Genesis so knowing there is active development going on for extra plugins such as these is  a great help and I can get around to this way of working…

          Also found this plugin from reading the discussion on the ‘Shortcode Madness’ post

          http://wordpress.org/extend/plugins/shortcodes-pro/

          Looks like the ideal solution for now…

          Thanks for the reply

          Dave

          #4116
          Wes
          Moderator

            Great! That plugin you linked to looks like it has some good ratings. I’ll recommend it if anyone else asks.

            Let us know if you have any other questions.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • The topic ‘Adding Shortcodes To The Theme’ is closed to new replies.