Looking for variables for use in HTML in post

  • Hi,

    I’m looking for a list of variables accissible in wordpress

      .com

    . (I know that you can hack anything when you run your own).
    Specifically what I’m looking for is the permalink URL handle and the title of the current post.
    What I want to do with it is to add a Facebook share button that doesn’t require that the FB user has enabled FB Platform Apps.
    The HTML syntax to do so is quite simple:
    Share
    The above is a simplistic version.
    So, what I’m looking for is the correct syntax to find what I called $THISURL and $THISTITLE.
    I’ve been searching online for two days so it must be a well kept secret :)
    Hope somebody knows.
    Thanks
    Knut

    The blog I need help with is: (visible only to logged in users)

  • Sorry forgot to use code tags. The href was
    http://www.facebook.com/sharer.php?u=$THISURL&t=$THISTITLE
    (Don’t try to push the Share link, it won’t do anything. Why don’t they let you edit posts?)

  • They don’t let you edit posts because in some heated thread back in time, people came in and edited their own threads to completely change the meaning. So, no editing.

    This is likely something staff will have to answer so I’ll tag this for their attention.

  • You can not edit posts in these forums because that option was abused too much: where folks were editing things to the point where the threads made no sense.

    “he says” “she says” edit ,repeat. edit repeat. change or delete…
    so you would see only illogical nonsense when you looked at archived threads…

    As for your “real” question, let’s hope another volunteer can answer.

  • ~~~tsp!
    (should have refreshed)

  • Thanks guys. I also found and tried the Settings->Sharing->Add Service.
    Doesn’t matter what I do, I put in name, URL and a link to a logotype, but nothing ever shows up in Available Services. I just started out so I don’t have anything fancy running.
    One example what I tried:
    Service Name: ShareFB
    Sharing URL: http://www.facebook.com/sharer.php?u=%post_url%&t=%post_title%
    Icon URL: http://cdn3.iconfinder.com/data/icons/socialmediabookmark/buttons/facebook_button.png
    So the Add new service does nothing for me, no new button shows up that I can drag to the Enabled Services area.

    No works for me either, they just show up as text, even though this is listed as legal HTML syntax (I know that many tags are restricted. I had this working once but never again. Is there any temporary problem with wordpress.com?

    Two separate questions. I hope someone knows because this is driving me insane. I know HTML but I’m new to WP. I have tried several examples posted but the result is always a bust. Help! ;)

  • Second paragraph tries to say “a href=URL…”

  • Use code tags around code you do not want interpreted.

    <code>put the code here</code>

  • Did you look at this support document on adding sharing services? It lists the variables that are allowed.

    Add Social Share Buttons

  • @thesacredpath. Yes I have read everything that is available including your link. The legal variables are actually listed right in the dialog when you add a service. My problem is that nothing happens when I add the service. There is no icon created that I can move to available services. Either the entire wordpress.com is broken, but I doubt that because we should have seen many more posts like mine, or there is some setting in my account that prevents me from doing what I want. This is why I’m kindly asking for ideas from you with more experience if you can think of any setting that would disable the ability to add a service.

  • I found something totally by mistake. Since I’m developing my site I had it set to private. When I changed settings->privacy to “Allow search engines to index this site” suddenly all the buttons I created shows up again. If I enable it, it works partially (%post_url% works,not %post_title%)
    Recommendations to WordPress.com:
    Short term fix: Put this in the manual!!!! There is no mentioning anywhere about this.
    Real fix: Enable the buttons even when you run your blog in private mode. The whole purpose of running it private is that you can develop and add content so that you don’t bore people with an unfinished blog.

    Remaining question: How do I now delete all the buttons (services) I added?

  • In the support documentation for sharing under Troubleshooting:

    Many of the Available Services are missing from the selection on the sharing settings page. If your blog is private, you will see fewer number of services

    listed.http://en.support.wordpress.com/sharing/#troubleshooting

    Remaining question: How do I now delete all the buttons (services) I added?

    Simply undo what you did previously. http://en.support.wordpress.com/sharing/#adding-your-own-service

  • Enabling the buttons in private mode would defeat the purpose of privacy as anyone that a user might invite to be a viewer of their blog would be able to share the posts on the social media sites. Granted, those clicking on the links at the social media site would be presented with a login screen when they tried to view one of the posts, but that just creates frustration and confusion.

    I agree though that there should be a blurb about the buttons not showing up when a site is set to private.

  • Also thanks for letting us know about this. I’ve logged it into my very over stuffed head and hopefully will remember it if this comes up again.

  • ok it works now. I also found how to delete services. So to summarize, my CR to WP:
    1) add this info in manual
    2) change code so that you can add and use services in private mode.
    Thanks
    Knut

  • 3) enabling sharing on a private blog would be pointless, as even if people could share the link, nobody could read it.

  • @raincoaster: Respectfully, I strongly disagree. During development and testing, I have a FB group and page set to private and the same with WP. This way I can make sure everything works before I show it off to the world.

  • @timethief & thesacredpath: same comment as above, but also from a manual standpoint, “fewer services” isn’t exactly clear IMO. In fact what happens is that all services except print and email are disabled, including adding your own!

  • @theknutpoint
    I’m thinking that if you need clarity on what “fewer services” means you may save time by contacting Staff directly.

  • The topic ‘Looking for variables for use in HTML in post’ is closed to new replies.