Forums

How correctly add anything new to single.php? (2 posts)

  1. funguy3000
    Member
    Posted 10 months ago #

    Hi,

    I am just willing to add a custom share button (did not find any plugins that suits me). So I add to the single.php file:

    [please read http://codex.wordpress.org/Forum_Welcome#Posting_Code about how to post code]

    <div <?php post_class(); ?>>
    
                        <?php woo_post_inside_before(); ?>
    
                        <h1 class="title"><a>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
    					<span class="active" id="sharebutton" st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText="ShareThis"</span>
                        <p class="post-meta">
                            <span class="small"><?php _e('', 'woothemes') ?></span> <span class="post-author"><?php the_author_posts_link(); ?></span>

    Y added line is just:
    <span class="active" id="sharebutton" st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText="ShareThis"</span>
    I pasted everything because I wanted to show where and how im adding.

    The main problem that after this everything gets really messy. How should I add correctly?

  2. s_ha_dum (was apljdi)
    Member
    Posted 10 months ago #

    You should post code inside the code tags because that is hard to read and may have gotten scrambled by the parser.

    In what way is it 'messy'? Do you have an URL?

Reply

You must log in to post.

About this Topic

Tags