I would like to have a single portfolio page set up as wordpress homepage at my domain www.syin.eu, using Valeria theme (biobutterfly.com/valeria/)

To achieve this, what I did is to redirect the homepage directly to where the single portfolio resides. So I added this piece of code to Home Page Templage (homepage.php)

$location = get_site_url() . "/x/x"; wp_redirect( $location, 301 ); exit;

Source: http://www.templatemonster.com/help/wordpress-how-to-create-a-redirect-from-a-home-page-to-any-url-using-the-php-redirect.html

However, what I need is to hide now the URL in the address bar to be /x/x. Is this kind of URL masking doable? Or can I set up a single portfolio page as homepage in some other way?

Thank you!

1 Answer 1


You can set the static home page through the wordpress customizer.

If you already have the page with the portfolio, just follow the steps below. Otherwise, create the page with the portfolio page template.

On the left menu, select Appearence, then Customize. Scroll down and you will see the option Static home page. Click on this option and select the Static page radio button, then a option will show. Click on the dropdown menu and select the page that you want to be the homepage. No need to edit the code.

This also can be done by Settings > Reading.

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.