Title: Get permalink of function defined in functions.php
Last modified: August 20, 2016

---

# Get permalink of function defined in functions.php

 *  [karwal.bubble](https://wordpress.org/support/users/karwalbubble/)
 * (@karwalbubble)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/)
 * Hi,
 * I am trying to get url for the function that I created in functions.php. I need
   a url link so that it runs code of that function. I will also pass parameters
   for that function.
 * I can’t use shortcode in page as parameters to that shortcode will be passed 
   dynamically.
    or if there is way in javascript how can I call that function on
   click of some button?

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/#post-3041048)
 * You do not need a url to run a function in functions.php. Just call/use the function.
 *  Thread Starter [karwal.bubble](https://wordpress.org/support/users/karwalbubble/)
 * (@karwalbubble)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/#post-3041066)
 * thanks esmi ..
    In which file I can call the function? because i just need that
   function on click of some link. I am doing coding in php almost after a year..
   may be i am asking simple question.. but can u plz explain more..
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/#post-3041067)
 * > In which file I can call the function
 * In any file. As long as the function is in functions.php, WP will look after 
   everything else.
 *  Thread Starter [karwal.bubble](https://wordpress.org/support/users/karwalbubble/)
 * (@karwalbubble)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/#post-3041071)
 * 
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/#post-3041072)
 * Is this javascript?
 *  Thread Starter [karwal.bubble](https://wordpress.org/support/users/karwalbubble/)
 * (@karwalbubble)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/#post-3041073)
 * no, I can use javascript also.. but currently I am want to use php function only
   because i can write my custom code of php and can call database tables also.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/#post-3041074)
 * What does this link do? You’re not exactly giving us a lot to work with.
 *  Thread Starter [karwal.bubble](https://wordpress.org/support/users/karwalbubble/)
 * (@karwalbubble)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/#post-3041075)
 * sorry. .. I just need to call some php function when i click on some link in 
   plugin file. I want to pass variables also through url for that function.
    Php
   function will contain my own code to add data into custom db table.
 * I hope this clarifies.

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

The topic ‘Get permalink of function defined in functions.php’ is closed to new 
replies.

 * 8 replies
 * 2 participants
 * Last reply from: [karwal.bubble](https://wordpress.org/support/users/karwalbubble/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/get-permalink-of-function-defined-in-functionsphp/#post-3041075)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
