WordPress.org

Ready to get started?Download WordPress

Forums

Loading into an iFrame? (4 posts)

  1. jayarrgee
    Member
    Posted 1 year ago #

    Hi guys, I'm quite nooby when it comes to WordPress - but I have a query regarding a website I am currently in the process of developing!

    Currently I have a website here: http://mindofgrime.rjs-creative.co.uk which is hugely revolved around WordPress itself, but the client requested specifically to only introduce 2 elements of wordpress itself.

    As you can see I have the central area printing one post, which will change depending on what the latest post is, this loads through an iFrame to allow scrolling in the central area with no layout changes.

    On the left hand side I am looking to have a bullet list of all the latest posts (roughly about 15-20 posts) - but I would like these to, when clicked/selected, to load into the iFrame?

    I was wondering if this was possible, or if anyone could print out the code or link tutorials? That would be awesome - thanks!

  2. jayarrgee
    Member
    Posted 1 year ago #

    Just as an update and because I forgot to mention... currently the code I am using for the post titles is:

    <?php
    global $post;
    $args = array( 'posts_per_page' => 20 );
    $myposts = get_posts( $args );
    foreach( $myposts as $post ) :	setup_postdata($post); ?>
    <a>" rel="bookmark" target="central" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
    <?php endforeach; ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    and my iFrame is called "central" - but naturally that is loading the whole blog in the window rather than just the actual post itself! :(

  3. esmi
    Forum Moderator
    Posted 1 year ago #

  4. jayarrgee
    Member
    Posted 1 year ago #

    I've already checked that out - Unfortunately that only provides information on how to produce 3 items, what I need is to be able to take the link that is produced by WordPress, and navigate it to load the post information within an iFrame, rather than A, when clicking the link it takes you to the post on wordpress or B, producing "A," but within the iFrame itself. - I just want the post's title and content to be loaded into the iFrame!

Topic Closed

This topic has been closed to new replies.

About this Topic