Link to home
Start Free TrialLog in
Avatar of tekgrl
tekgrl

asked on

Editing <p> tag that is around "continue reading" link on blog

I know that it's somewhere in "loop.php" but I don't know how to remove it. Help! I need to apply a float style to it.
Avatar of mjjdesigns
mjjdesigns
Flag of United States of America image

It would depend on what theme you're using - many custom themes build that into functions.php

If you just want to apply a style to it, you'd want to do that through your style.css file.  Just determine what class/id is being assigned to that "continue reading" link, and add a float:left or float:right to it through CSS.
Avatar of tekgrl
tekgrl

ASKER

That link won't float if it's contained within a <p> tag. I need to either eliminate the <p> tag or figure out how to style it.
What's the name of the theme you're using?

The default behavior of the "Read More" is controlled by index.php, but can the function can be modified by functions.php as well.

See: http://codex.wordpress.org/Customizing_the_Read_More for more details.
Avatar of tekgrl

ASKER

twentyten
Theme: twentyten | File: functions.php | Line: 241


return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';

You could wrap it in a style of its own:  <a href="'. get_permalink() . '" class="float-class"> and that should do the trick.

Avatar of tekgrl

ASKER

It didn't work. This is what I posted in functions.php

function twentyten_continue_reading_link() {
      return ' <a href="'. get_permalink() . '"class="float-class">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';
}

a class="float-class" didn't show  up when I viewed the source either.
Have you modified the theme files themselves? Maybe you're not using that function in the theme anymore?

Without seeing the files and what modifications you've made to them, it won't be possible to figure out why it's not working.
Avatar of tekgrl

ASKER

Okay, maybe someone else can help me. When I change this line in "loop.php" the changes show up live:

<div class="entry-content">
                        <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
                  </div><!-- .entry-content -->

I just need to know how to remove the <p> tag around that link. I'm not going to be able to float the link with that still there.
ASKER CERTIFIED SOLUTION
Avatar of mjjdesigns
mjjdesigns
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial