I am in the process of establishing my first wordpress theme, and within the post loop, I would like to add some share buttons. I am not entirely certain if this can be achieved, but is there a way to, instead of putting in a static URL for the button (ex. facebook like button), put a line of php that dynamically places the URL of the post the buttons are nested in?
I was looking into the Share This plugin, but I'm unsure if this would be a viable solution for me.
Yes sir, most certainly is possible although I'm not sure if it's compatible with the Share This link you shared. It looks like their code doesn't have a spot for the URL. Their code grabs it for you.
However, if you do find a code where you type in the url it's very easily done.
First you grab whatever the current URL is and create a variable:
I was looking into the Share This plugin, but I'm unsure if this would be a viable solution for me.
any help would be greatly appreciated!
However, if you do find a code where you type in the url it's very easily done.
First you grab whatever the current URL is and create a variable:
and then you add it where a social media code needs it (the following example is a Facebook Comments code):