Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_shortcode('picture', 'random_picture');
- function random_picture($atts) {
- extract(shortcode_atts(array(
- 'width' => 400,
- 'height' => 200,
- ), $atts));
- return '<img src="http://lorempixel.com/'. $width . '/'. $height . '" />';
- }
- links .. https://codex.wordpress.org/Shortcode_API
- how to create a plugin.... https://www.elegantthemes.com/blog/tips-tricks/how-to-create-a-wordpress-plugin.
Add Comment
Please, Sign In to add comment