WordPress.org

Ready to get started?Download WordPress

Forums

Where do I insert code snippet - I'm PHP/CSS know-nothing! (4 posts)

  1. cpchambers
    Member
    Posted 4 years ago #

    I know nothing about css or php, so please be kind ;-)

    What I'd like to do:
    I grab the code snippet for "Share on Facebook," and I'd like to make it appear in every post, so the post itself can be sent to FB. But I don't have any idea which PHP or CSS file to edit. I'm using a template with WordPress (news something-or-other 640).
    I'm messed around with index.php and single-page.php (I think that was its name), and randomly began pasting the code snippet into different areas to see what happens. Are either of these files the right one to edit, or should I be messing with the .css file (I forget its name)?
    It "sort of" worked, eventually, but when I'd preview the site, and click the share button, the text would contain the post's subject, but no text from the post itself - only text from the 1st comment to the post. No matter where I put it in either file, the text always grabbed the comment's text and not the post's text... if the button showed up at all.

    Is there a wysiwyg editor I can use with WordPress? Something (don't shoot me) like FrontPage? Something I can use to edit the site "live?" I'm on Mac, now, so Frontpage isn't an option.
    In the past, using FrontPage, I'd open the page I was editing (HTML, never PHP) in the visual editor, select the area where I wanted the code snippet to be inserted, switch to HTML view (where I'd see the code selected reflecting what I'd selected in the visual editor), and paste the code snippet there.
    How can I do this with PHP....CAN I do this with a PHP site?

    Thank you,
    Chris

  2. cpchambers
    Member
    Posted 4 years ago #

    Following up...
    I've found the FaceBook Plugins, but none seem to work properly.
    I've tried about 5 of them, and none of them grab the post itself. They just pull the text of the 1st comment to the post, or they grab the "copyright" info from the bottom of the main page (maybe this comes from the CSS page or index.php?).

    Does anyone know of a FB plug-in that works?

    Thanks, again,
    Chris

  3. script2see
    Member
    Posted 4 years ago #

    The Add To Any plugin is good for this. Here's the link:
    http://wordpress.org/extend/plugins/add-to-any/

    It can be used to make a social bookmarking button appear under posts.

  4. cpchambers
    Member
    Posted 4 years ago #

    got the plugin working, thanks to the author.

Topic Closed

This topic has been closed to new replies.

About this Topic