Title: What function in wordpress can trigger a function
Last modified: August 21, 2016

---

# What function in wordpress can trigger a function

 *  [sukarno21](https://wordpress.org/support/users/sukarno21/)
 * (@sukarno21)
 * [12 years ago](https://wordpress.org/support/topic/what-function-in-wordpress-can-trigger-a-function/)
 * What function do i have to use in wordpress to trigger my function is it ajax
   call??im making a plugin and im calling my function manually nad finding the 
   content but i think it can automatically be called but how??. for example i have
   a page Home and Product when i click the home page it will call my function and
   display it in the content area and also the same when i click Product it will
   call my function Product and display something in the content area? Please help
   me with this im stuck here dont know what wordpress function to use.

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years ago](https://wordpress.org/support/topic/what-function-in-wordpress-can-trigger-a-function/#post-4915013)
 * You first need to ensure that you are enqueuing your javascript correctly. See
   [wp_enqueue_script()](http://codex.wordpress.org/Function_Reference/wp_enqueue_script).
 *  Thread Starter [sukarno21](https://wordpress.org/support/users/sukarno21/)
 * (@sukarno21)
 * [12 years ago](https://wordpress.org/support/topic/what-function-in-wordpress-can-trigger-a-function/#post-4915029)
 * im using wp_enqueue_script().My problem is how can i call my function and load
   into the content area automatically cause im doing it manually? for example i
   have a link home and product when i click product in one of my navigation it 
   will call that function and that call will call the php file and it will show
   in the content area. how can i achieve this? im new in wordpress. thank you.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years ago](https://wordpress.org/support/topic/what-function-in-wordpress-can-trigger-a-function/#post-4915031)
 * wp_enqueue_script() will load your js automatically. After that, it’s really 
   down to the .js script as to what gets called when and how.
 *  Thread Starter [sukarno21](https://wordpress.org/support/users/sukarno21/)
 * (@sukarno21)
 * [12 years ago](https://wordpress.org/support/topic/what-function-in-wordpress-can-trigger-a-function/#post-4915042)
 * how can js call my function in php? and what function in php should i call when
   i want to put in the content area? thank you for the reply [@esmi](https://wordpress.org/support/users/esmi/)....

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

The topic ‘What function in wordpress can trigger a function’ is closed to new replies.

## Tags

 * [wordpress function](https://wordpress.org/support/topic-tag/wordpress-function/)

 * 4 replies
 * 2 participants
 * Last reply from: [sukarno21](https://wordpress.org/support/users/sukarno21/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/what-function-in-wordpress-can-trigger-a-function/#post-4915042)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
