WordPress.org

Forums

Inserting Page Content into HTML Tag (2 posts)

  1. wyclef
    Member
    Posted 6 years ago #

    Hey, I'm trying to insert the <?php the_content(); ?> into a <p> tag with a class of 'intro'. Just wondering how to do this? I was able to do it easily with <h2><?php the_title(); ?></h2> but there was no special class name so...

    Also, i'm trying to use list pages to make a little list in the footer of my nav, because i'm thinking i'm gonna hard code the nav list in the header template. I've basically got it working but am wondering how I can insert a little html entity before the links like in the home part...

    <ul>
    	<li>&rsaquo; <a href="<?php bloginfo('url'); ?>">Home</a></li>
    	<?php wp_list_pages('title_li='); ?>
    </ul>
  2. esmi
    Forum Moderator
    Posted 6 years ago #

    the_content() already incorporates <p> tags, so if you want to enclose it in a class use something like:

    <div class="postcontent">
    <?php the_content;?>
    </div>

    i'm trying to use list pages to make a little list in the footer of my nav

    Usewp_list_pages with the link_before parameter:

    http://codex.wordpress.org/Template_Tags/wp_list_pages

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.