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.
tekgrlAsked:
Who is Participating?
 
mjjdesignsConnect With a Mentor Commented:
"the_content" is controlled from functions.php, I'd start there and modify the function "the_content" as you see fit.

You could also remove the "Continue Reading" piece from the_content in your loop.php file, and include it in its own div via the pre-build twentyten_continue_reading_link function: ie;

<div class="entry-content">
                        <?php the_content(); ?>
             <div class="float-class"> <?php twentyten_continue_reading_link(); ?>
                  </div></div><!-- .entry-content -->

Assuming you don't have anything defining a new paragraph in functions.php for the twentyten_continue_reading_link - you should be fine with that.
0
 
mjjdesignsCommented:
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.
0
 
tekgrlAuthor Commented:
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.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
mjjdesignsCommented:
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.
0
 
tekgrlAuthor Commented:
twentyten
0
 
mjjdesignsCommented:
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.

0
 
tekgrlAuthor Commented:
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.
0
 
mjjdesignsCommented:
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.
0
 
tekgrlAuthor Commented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.