WordPress.org

Forums

[resolved] Editing posts (9 posts)

  1. elevatingyourbusiness
    Member
    Posted 4 years ago #

    I want to put this code on the top of a post. (I have it on the bottom already)

    <?php if (function_exists('sociable_html')) {
    echo sociable_html();
    } ?>

    Which php file would I edit for that to happen?

  2. Tara
    Volunteer Moderator
    Posted 4 years ago #

    check this "add shortcode" WP_Snippet and see if you can use it for your purpose:

  3. esmi
    Forum Moderator
    Posted 4 years ago #

    Or add it to the single.php template file in your theme just before the posts title.

  4. elevatingyourbusiness
    Member
    Posted 4 years ago #

    These are the options I have
    (404.php)
    (archive.php)
    (comments.php)
    (footer.php)
    (header.php)
    (index.php)
    (page.php)
    (search.php)
    (functions.php)
    (home.php)
    (l_sidebar.php)
    (myheader.php)
    (myheader1.php)
    (r_sidebar.php)

  5. esmi
    Forum Moderator
    Posted 4 years ago #

    Looks like your theme does not have a separate single.php template file. ;-(

  6. elevatingyourbusiness
    Member
    Posted 4 years ago #

    Yes esmi. That's why I thought it might be helpful to tell you what I had.

    What does the single.php include. Maybe I can do a search through some of the files I "think" it could be.

  7. esmi
    Forum Moderator
    Posted 4 years ago #

    The most likely template file is going to be index.php. That's the file that should be used if a theme doesn't contain a single.php template.

  8. cuban_cigar
    Member
    Posted 4 years ago #

    make a copy if index.php, but call it single.php

    this is now the template for posts and may be edited without changing the homepage

  9. elevatingyourbusiness
    Member
    Posted 4 years ago #

    Thanks everyone.

    I tried the index.php but that didn't work.

    So I tried home.php, (same code as index.php) and that worked.

    The theme is Elements of SEO. Just in case anyone else ever has this problem.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.