• Resolved mila108

    (@mila108)


    I am customizing a child theme within Genesis. What are the cons & pros of using hooks in a theme (ie, Genesis Simple Hooks) vs WordPress shortcodes, from performance and maintenance point of view? Are shortcodes plugins?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hooks are meant for programmers to be able to execute their code in specific situation.

    Shortcodes are meant to provide the user an easy way to ‘invoke’ the functionality of a plugin (e.g. putting the shortcode in a post’s content and having it display a list of posts in a specific category).

    Thread Starter mila108

    (@mila108)

    Thanks, Michael. I understand the purpose. I used to program in different environments, but websites/WP/themes environment is new to me. My question was from performance and maintenance point of view… There are situations where a similar functionality is offered through widgets, hooks and shorthands, and I am trying to understand what’s best from performance and maintenance point of view?

    I would guess shortcodes/plugins are slower that hooks.

    As far as maintenance, from an user standpoint shortcodes/widgets would be preferred.

    Thread Starter mila108

    (@mila108)

    Thank you.

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

The topic ‘Hooks vs shortcodes?’ is closed to new replies.