WordPress.org

Ready to get started?Download WordPress

Forums

Some text after title in content (5 posts)

  1. newone1
    Member
    Posted 1 year ago #

    Hi,

    I am using twenty ten theme. Now have added some information through conditional tag for different posts on loop.single.php so when I open those posts - information shows in but when I go through category, or home pages - those posts information does not show. I adding below code in sigle.php

    <?php if ( is_single ( array( 'WORK' ) ) ) { ?>
    <div style='margin:-50px 5px 0px 5px; float:right'><img src="http://example.com/wp-content/uploads/2012/11/work.jpg" alt="work" title="work" width="120" height="120" class="alignright size-full wp-image-6924" />
    </div>
    <?php } ?>
    <?php if ( is_single ( array( 'Routine' ) ) ) { ?>
    <div style='margin:-50px 5px 0px 5px; float:right'><img src="http://example.com/wp-content/uploads/2012/10/Routine.jpg" alt="Routine" width="100" height="100" class="alignright size-full wp-image-6453" />
    </div>
    <?php } ?>

    So now I want this condition to be shown in whether I open pages, or home page through, or Category.. etc

    Thanks in Advance

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Make sure you transfer your modifications into a Child Theme.

  3. newone1
    Member
    Posted 1 year ago #

    Can you please guide step by step detail of doing this?

  4. Have you looked at the link Andrew provided?

    http://codex.wordpress.org/Child_Themes#Example_of_a_basic_Child_Theme

    Once you've created your basic child theme with a new directory and style.css you can make changes to copies of the parent theme files in the child theme directory.

  5. newone1
    Member
    Posted 1 year ago #

    thanks for your reply dear - but I just want to add some conditional tag, that to be applied whether that post shows in single, post pages or category pages. I don't know how create a child theme. Is there any another easy way to do it.?

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic