Where to put my code: plugin or functions.php?

I would start with this question: Is the functionality related to presentation of content, or with generation/management of content, or of the site, or of the user identity? If the functionality is not related specifically to presentation of content, then it is squarely within Plugin Territory. This list is long: Modifying core WP filters (wp_head … Read more

Creating a custom rebrandly link using a wordpress shortcode

I am trying to create a rebrandly short link using a WordPress shortcode. Here’s what I have so far: Following the directions for PHP here – https://developers.rebrandly.com/docs The shortcode I’m testing is [shortlink]https://example.com[/shortlink] but its not working. When I change the part: $post_data[“destination”] = $content; to $post_data[“destination”] = “http://example.com”; it works. I must be putting … Read more