Jump to content
xisto Community

Search the Community

Showing results for tags 'shortcode'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Help & Support
    • Alerts, News & Announcements
    • Web Hosting Support
    • Introductions
  • Computers & Tech
    • Science and Technology
    • Software
    • The Internet
    • Search Engines
    • Graphics, Design & Animation
    • Computer Gaming
    • Websites and Web Designing
    • Mobile Phones
    • Operating Systems
    • Programming
    • Online Advertising
    • Hardware Workshop
    • Computer Networks
    • Security issues & Exploits
  • Others
    • General Discussion
    • Business Forum
    • Photography
    • Health & Fitness
    • Dating And Relationships
    • The Vent
    • Art & Creativity
    • Home & Garden

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests

Found 1 result

  1. I have been digging deep into wordpress plugin development (at least trying to) so that I can develop some plugins for my website that would enhance its user experience and reduce the maintenance efforts. One of the planned plugins is one that handles some shortcodes for me. Wordpress has provided a rich API for shortcode development and it is quite fun to use. But I am stuck with one issue that I need to resolve. The plan is to create a shortcode which uses a variable as the word. For instance the following code will register a shortcode [home] that will be converted to a link to the home page. add_shortcode('home', 'show_home_link');function show_home_link () {return '<a href="http://http://www.mysite.com/;;} But what i need is that the word "home" be a variable $var. The plan is to check the value of $var agains the post_title entries of the wp_posts table of the wordpress database. And then according to the match found, display appropriate link to that specific page. This would make me able to just say [about] to post a link to about page. or [my first blog post] to post a link to the post with title "my first blog post". I know how to develop the function to check agains database entries and produce corresponding link but what I don't know is how to make the shortcode use a variable entry.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.