WordPress.org

Ready to get started?Download WordPress

Forums

From Drupal to WP (2 posts)

  1. jrod1980
    Member
    Posted 1 year ago #

    Okay, so I am learning how to develop themes for WordPress. It's mostly easy, except for a few things.

    In Drupal, you can create custom "regions" - and you can use a bit of PHP code to hide / show those regions on the front page and subsequent pages. You can then create "blocks" to stick into regions - a lot of work to get a few visual things going, I know.

    My question: is there a way to create custom regions in a WP theme? Can you hide those regions on secondary pages / having them ONLY show on the front page? I want to be able to create teasers / etc.

    I am coding up a responsive website for a client, here is a SS of the top: http://web.jrrart.com/DEDD_SS.jpg.

    So, things like "Experience Downtown", "Do Business", etc. I want to be able to link to other pages / etc. I am just at a loss on how to get started with coding those particular details.

    I really like the user interface of WP, and it will do for me quite nicely what makes me want to pull out my hair with Drupal.

    Any and all help appreciated!

    Kindest Regards,
    - JRod

  2. catacaustic
    Member
    Posted 1 year ago #

    The "easy" way to do it in your WordPress template files is using the is_front_page() function. Depending on how your site is set up you also might need the is_home() function. Even though they are pretty close they do things slightly differently.

    As an example, something like this:

    <?php if (is_home () || is_front_page ()): ?>
        <p>Homepage content here.</p>
    <?php else: ?>
        <p>Inner page content here.</p>
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic