What I currently have developed:
What I want to achieve:
I have made a custom plugin which currently reads the 'hashtag' (query string) and displays it through my custom shortcode.
/result/ is a static page with the custom shortcode [woink_hashtag_result]. This currently works as intended.
Here is what I've currently produced.
function woinkResult()
{
$return = '<p>' . get_query_var ('hashtag' ) . '</p>';
// Output needs to be return
return $return;
}
add_shortcode('woink_hashtag_result', 'woinkResult');
function pce_register_query_vars ( $vars ) {
$vars[] = 'hashtag';
return $vars;
}
add_filter ( 'query_vars', 'pce_register_query_vars' );
How can I make the url prettier like: http://wordpress.test/hashtag/twerk ?
Thanks if you have made it this far.