Custom Plugin Question (6 posts)

Topic tags: custom, plugin, Plugin Development
  • Profile picture of Chad Chad said 1 year, 8 months ago:

    Hello WPNYC,

    I am working on a custom plugin for my company that pulls member data from a external source. I have created a page to list all the members along with a search component and have added it to a page via a shortcode.

    Where i am stuck…
    I have a link on the members name going to a details page with the members info adding it to a page via a shortcode. My problem is how can i link the members name with out hard coding the href to the specific page where my details shortcode lives?

    This was hard to explain, so please let me know if you need additional info.

    Thanks in advance
    Chad

  • Profile picture of Steve Steve said 1 year, 8 months ago:

    More details please… ;)

  • Profile picture of Chad Chad said 1 year, 4 months ago:

    Hey Steve..

    We talked briefly about this problem i have at the last Wordpress Meetup.
    You mentioned that you may have some code to for Wordpress to check if a parameter is being used. Can you please post it so i can check it out.

    Thanks in Advance
    Chad

  • Profile picture of Steve Steve said 1 year, 4 months ago:

    More details please… ;)

  • Profile picture of Chad Chad said 1 year, 4 months ago:

    Steve,

    I explained to you that my co-worker help me develop a plugin and we are pulling data from SQL databse listing members. We wanted to have each member to have a detail page but we were having a problem passing a members id to another page.

    After our quick discussion last Tuesday you mention you have a snippet of code that might help me accomplish this task.

    Thanks in Advance
    Chad

  • Profile picture of Steve Steve said 1 year, 4 months ago:

    @Chad– Now I remember!

    Pass the member ID to the new page via a query parameter: (ie http://www.mysite.com?member=steve

    Then grab that parameter with:

    if (isset($_GET['member'])) { do_something };

    Does that make sense?