WordPress.org

Ready to get started?Download WordPress

Forums

How can i hardcode a little data to my posts (8 posts)

  1. tocadisco
    Member
    Posted 8 months ago #

    Hello i wanted these http://prntscr.com/2340oh Embed in each and every new post i create. Suppose when i click on create a new post , they should automatically show instead of me typing it all over again for every new post i make. Is there a plugin or code for that?

  2. blacklinemedia
    Member
    Posted 8 months ago #

    One way of doing this would be to copy the html that is generated by that and then to copy it into your themes single.php file, either above or below the the_content loop.

    The disadvantages of this method are:

    1. When you update the theme, this code will have to be added to the new version of the theme
    2. This will apply this code to all posts and you will not be able to remove it from the WP backend

    I hope that helps,
    Alex Black - [signature moderated]

  3. tocadisco
    Member
    Posted 8 months ago #

    Since i am new to this i wouldnt want to try it myself and then create more problems with the code.. Can you please help me do it?

  4. blacklinemedia
    Member
    Posted 8 months ago #

    Sure link me to your site where that footer is and also post the code that is in your single.php file in your theme.

  5. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    When you update the theme, this code will have to be added to the new version of the theme

    Why not make the changes in a child theme? That's generally the best way to modify theme files.

    http://codex.wordpress.org/Child_Themes

  6. blacklinemedia
    Member
    Posted 8 months ago #

    @WPyogi Verry true, thank you for pointing that out :-)

  7. tocadisco
    Member
    Posted 8 months ago #

    @blackmedia is there any way that i can contact you personally to send u the details?

  8. tocadisco
    Member
    Posted 8 months ago #

    and thanks WPyogi, for me this is all like learning abc from scratch, i tired to fiddle with the theme and my site went blank lol

Reply

You must log in to post.

About this Topic