Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #233
    dan
    Participant

    Hello,

    There are two ways to create recyclable component in WordPress, one is to use is to create a function inside functions.php and the other function is just to use get_template_part() function.

    How to know which one to use? Are they the same?

    #234

    If you want a flexible way of doing it create a function. You can do add arguments to it to suit your needs.

    If you have just bunch of html codes that you want to recycle, get_template_part() function is enough.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.