WordPress Multisite 1
Snippets
Ziyad Bachalany

Create a shortcode for the permalink of a WordPress article

I needed to create a shortcode that would allow me to display the link to a WordPress article. To do this, here is the code I added to my functions.php file: [code] add_shortcode( 'my_permalink', 'my_permalink' ); // The Permalink Shortcode function my_permalink() { ob_start(); the_permalink(); return ob_get_clean(); } [/code] And there was

Read more »

Don't miss business advice by email

No spam, just an email when new content is published.

en_US