ZaZaKi, a web developer Between Manchester UK & Rotterdam NL. © 2015-2024.

WP functions with shortcode

 

 
// [my_function name="sarnas" age="40"]
function zzk_my_function( $atts ) {
$a = shortcode_atts( array(
'name' => 'what is your name?',
'age' => 'what is your age?',
), $atts );

return "Name = {$a['name']} Age = {$a['age']}";
}
add_shortcode( 'my_function', 'zzk_my_function' );
 

Call the shortcode function


 [my_function name="sarnas" age="40"]

50 Related pages

  1. About WordPress
  2. Child pages and Related pages display
  3. Display all posts title on any page, WordPress
  4. Display child pages of specific page anywhere, WordPress
  5. Display child pages of the current page, WordPress
  6. Display date the page created, WordPress
  7. Display related pages, WordPress
  8. dns-prefetch, remove, WordPress
  9. Featured image, WordPress
  10. Get all parent pages, WordPress
  11. Get current page ID, WordPress
  12. Get ID of most top page, WordPress
  13. Get parent title as URL link
  14. Hook to head with wp_head
  15. If has category, WordPress
  16. If has tag, WordPress
  17. If page is parent or child page, WordPress
  18. Implementing website design into the WordPress with minimum requirements
  19. Increase Maximum Upload File Size, WordPress
  20. List child pages of a specific page, WordPress
  21. List subpages even if on a subpage, WordPress
  22. Parent, Child and Grandchild page
  23. Show pages in the index page, WordPress
  24. Show related pages even on the subpage, WordPress
  25. WordPress Addmin Toolbar position
  26. WordPress count child pages
  27. WordPress Display child pages
  28. WordPress display single page by ID
  29. WordPress Error log redirect into specific file
  30. WordPress get template directory and uri
  31. WordPress post type icon
  32. WordPress Show only parent pages
  33. WordPress wp_enqueue_style
  34. WordPress, display all pages in website, Dropdown option select
  35. WordPress, display child and grandchild pages
  36. WordPress, Display parent pages only
  37. WordPress, Parent page has number of child pages
  38. WP Avenced Search
  39. WP Basic for WordPress Theme
  40. WP cache
  41. WP count children of parent page
  42. WP count page, post or custom post type
  43. WP count related pages
  44. WP Count taxonomy-name
  45. WP function with shortcode
  46. WP functions with shortcode
  47. WP generate theme online
  48. WP image exist
  49. WP plugin exists or active
  50. WP remove global styles from the head