WordPress.org

Ready to get started?Download WordPress

Forums

How call php function (6 posts)

  1. sin128
    Member
    Posted 4 years ago #

    Hi i have this poblem:
    I wrote my wordpress plugin and i want call plugin php function in page creation.
    Can anybody help me with this problem?
    Thanks

  2. alieneila
    Member
    Posted 4 years ago #

    If the plugin is activated and you want to call a function in a page, you'll want to make a shortcode in your plugin.

    add_shortcode('my-shortcode', 'myFunction');

    and in the edit page put [my-shortcode]

  3. MichaelH
    Member
    Posted 4 years ago #

  4. alieneila
    Member
    Posted 4 years ago #

    Oh, sorry I missed that you wanted it to add function to "page creation", thought you wanted to include a function into a page. The links Michael posted should help you.

  5. sin128
    Member
    Posted 4 years ago #

    Thank MichaelH for reply but i donĀ“t know witch hook to use. If you can please write some example how include plugin function in new page witch will be displayed on web

  6. sin128
    Member
    Posted 4 years ago #

    No one know haw solve my problem

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.