• 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)
  • You do not need a url to run a function in functions.php. Just call/use the function.

    Thread Starter karwal.bubble

    (@karwalbubble)

    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..

    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

    (@karwalbubble)

    But which url i will use on link? like if my function is in functions.php, i want to call that function on click of button in one plugin . Do i need to use onclick javascript or some other way use it in “href” variable of tag.?

    Is this javascript?

    Thread Starter karwal.bubble

    (@karwalbubble)

    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.

    What does this link do? You’re not exactly giving us a lot to work with.

    Thread Starter karwal.bubble

    (@karwalbubble)

    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.