0

This is my first time posting here, thanks for all you guys do.

I have a question that is probably fairly simple, but I know very little about PHP and after several hours of trial and error I figured I'd ask for some help.

I am creating a simple portfolio site and I like the way this particular theme displays blog posts, but I also want to add some text and an image to the front page.

here is a link to the site: gannerwebdesign.com and basically what I would like to do is combine the home page and the portfolio page so I get the text and image from the home page and the side scrolling blog posts from the portfolio page.

Let me know what you think! Thanks!

0

1 Answer 1

0

I don't if this is what exactly you need! I am assuming you have created portfolio page and just wanted to show it on front page with other content of front page.

You can call any page to your front page with following code

$include = get_pages('include=10'); //Assigning ID of page
      $content = apply_filters('the_content',$include[0]->post_content);
      echo $content;

In the above code code I have assign ID 10 to get_page() function, just for demo purpose. Replace 10 with your actual page ID whose content you want to show in home page (your portfolio page).

Just Paste the above code Where ever you want your portfolio to be appear.

NOTE: This code will call only Page (dashboard -> pages). If you want to call Post (dashboard -> posts) then you just need to replace get_pages() functions with get_posts() functions, Else all are same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.