Removing Division on Landing Page and Best Practices

Community Forums Forums Design Tips and Tricks Removing Division on Landing Page and Best Practices

This topic is: not resolved

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  cdils 1 year, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12353

    WolfgangSepp
    Participant

    The support desk referred me to this forum for my questions, which I have 2.

    I added the following code to my functions.php file:


    // Add Feature Area after header

    add_action( 'genesis_after_header', 'rr_include_feature_area' );

    function rr_include_feature_area() {

    require(CHILD_DIR.'/rr_feature_area.php');

    }

    The rr_feature_area.php file is just HTML code for an image and a form.

    My first question is…

    I want my feature area on most of my pages except for a landing page that I modeled after Brian Gardner’s (http://www.briangardner.com/create-landing-page/). What is the best way of removing my feature area on just that page?

    My second question is if it is a good practice to reference another php file from within the functions.php file or should I just add the code in to functions.php?

    Thank you,
    Wolfgang

    #13906

    cdils
    Participant
    Post count: 420

    Hi Wolfgang,

    I’m not sure I totally understand your first question. I *think* if you’re using a landing page template (a la Brian’s tutorial), it shouldn’t pick up your featured area?

    But to your second question, there is nothing “wrong” with referencing another php file from your functions.php. I find it a nice way to maintain custom code separately from functions.php (I like to switch themes a lot!). I think it probably boils down to a matter of  developer preference, but to my knowledge, you are fine to approach it either way.

    Cheers,

    Carrie

     


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I tweet @cdils.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.