WordPress.org

Ready to get started?Download WordPress

Forums

Page content in Divs (2 posts)

  1. Jeff F.
    Member
    Posted 1 year ago #

    I am looking to put the content of a page in a div on my homepage. I have found several ways to do it, but they get the content and not the title and my php is still growing so I thought I'd turn to here for help because google isn't coming through. :)

    This is the code that I'm using that's getting me the page content;

    <?php echo do_shortcode('[post-content id=1286]'); ?>

    what can i add or do differently to get the title as well, ideally separate so I can assign th same class I'm using for the other sections.

    thanks

  2. Jeff F.
    Member
    Posted 1 year ago #

    Never mind got it.

    <?php echo get_the_title( X ); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags