Skip to content

Instantly share code, notes, and snippets.

@TysonRayJones
Created January 21, 2018 21:27
Show Gist options
  • Select an option

  • Save TysonRayJones/e58fdc8e976c78324a125e57d731c047 to your computer and use it in GitHub Desktop.

Select an option

Save TysonRayJones/e58fdc8e976c78324a125e57d731c047 to your computer and use it in GitHub Desktop.
Html code added via shortcoder to add a posts button to researcher profiles
<input type="button" value="View Posts" onclick="redirToPosts();" style="background-color:#bdbdbd;" />

<script>
function redirToPosts() {
	var oldURL = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname;
	var newURL = oldURL + "?profiletab=posts";
	window.location.replace(newURL);
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment