Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Plugins on word press


Published on

This deck was presented in Bogotà in the WordCamp 2017 event by people who are part of the company.

Presented by: Rhonlaf Martinez, Front-end developer

Published in: Software
  • Be the first to comment

  • Be the first to like this

Plugins on word press

  1. 1. @rhonaldomaster #WCBogota
  2. 2. Plugins in WordPress? No, shortcodes! Rhonalf Martinez @rhonaldomaster #WCBogota
  3. 3. Rhonalf Martinez @rhonaldomaster Front-end dev at Koombea @rhonaldomaster #WCBogota
  4. 4. What’s this about all about? ● What can I use it for? ● And where do I put it on the site? ● Action (without lights and cameras?) ● Some documentation. ● Farewell. @rhonaldomaster #WCBogota
  5. 5. Reusable snippets [shortcodes] ● Reuses ... what? ● Reusable snippet = reusable code. ● Can be used anywhere on the site. ● You do it your way. @rhonaldomaster #WCBogota
  6. 6. I understand ... and what can I use it for? For whatever you need! ● Customize your site with these tools your way. ● You do not have to repeat code. ● You can do them yourself or look for some implemented code on the internet. @rhonaldomaster #WCBogota
  7. 7. Excellent! And how do I create them? ● It’s code, so you can simply use your favorite editor. ● Add them to the theme's functions.php file. ● Use them on your site! @rhonaldomaster #WCBogota
  8. 8. Ready, set, go! @rhonaldomaster #WCBogota
  9. 9. A shortcode is added to the site using the syntax [nameshortcode]. You can receive parameters [nameshortcode parameter = "Hello"]. You can also send content [nameshortcode] Hello Mom! [/ Shortcode]. The shortcode will return a string that will be written to the page. @rhonaldomaster #WCBogota
  10. 10. After creating your shortcode, we tell Wordpress that we want to use it. To do this, we use the following instruction: add_shortcode ('name_user', 'create_user'); In our case: add_shortcode ('nameshortcode', 'say hi_to_mom'); @rhonaldomaster #WCBogota
  11. 11. And then what? Now comes the simple part: You just have to place the shortcode in the editor in your entry or page: @rhonaldomaster #WCBogota
  12. 12. And in your post / page you will see this: Yes, that's it. @rhonaldomaster #WCBogota
  13. 13. Are there any predefined shortcodes? Sure! Wordpress has the following: ● [audio] - ● [caption] - ● [embed] - ● [gallery] - ● [playlist] - ● [video] - @rhonaldomaster #WCBogota
  14. 14. Let's create a shortcode! @rhonaldomaster #WCBogota
  15. 15. We can use these online tools t-generator @rhonaldomaster #WCBogota
  16. 16. When using the tool Both will give us a text or code, which we must place in the file functions.php of the theme of our site. Then, we can use the shortcode in the input or page we want! // Add Shortcode function custom_shortcode() { return '<span>Hola mamá, mira lo que hice</span>'; } add_shortcode( 'testing', 'custom_shortcode' ); @rhonaldomaster #WCBogota
  17. 17. Some documentation ● ● ● ● ● ● ● ● wordpress/ @rhonaldomaster #WCBogota
  18. 18. Thank you :)