Forums

Need to embed an existing page only on the home page (5 posts)

  1. Zazou
    Member
    Posted 3 years ago #

    Hi,

    I'm trying to embed a working page (/about) into the homepage of my site, above the latest posts. I just need it to display on the homepage.
    I also would like to be able to somehow fix it a bit, so it'd rock if I could add divs inside the php code.

    I tried this method:

    <?php if(is_home()){query_posts('pagename=about');}?>

    And, even the Improved Include Page plugin, and yet, I can't manage to make it work the way I need it to.

    Thanks in advance!

  2. whooami
    Member
    Posted 3 years ago #

    ...even the Improved Include Page plugin, and yet, I can't manage to make it work the way I need it to.

    that plugin works flawlessly. what, specifically, are you having trouble with?

  3. Zazou
    Member
    Posted 3 years ago #

    The plugin works great for just the implementation, but I want to be able to change the look of the page a bit as it gets displayed on the home page. For instance, I'd like to add one div right before the include, which would allow me to style it in a specific way on the home page.

    I hope that made sense.
    Thanks for the fast reply. :)

  4. whooami
    Member
    Posted 3 years ago #

    then use a custom page template for that particular page.

    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    Just to make sure that it works as expected. make a quick custom page template with a bare minim of content, ie helloo this a test.

    apply that template to your about page.

    use the iinclude bits that the plugin uses, and see if the that test template is being used.

    If so, just customize that to your liking.

  5. Zazou
    Member
    Posted 3 years ago #

    Too braindead to try it now, but I'll try it tomorrow and let you know how all that works out. Thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic