Home page content box load on click only?

Support Area Forums Foxy Home page content box load on click only?

Viewing 11 posts - 1 through 11 (of 11 total)
URL to the page in question: http://shift-command.com/dev/
  • Author
    Posts
  • #24918
    brent stewart
    Participant

    Hi Bill,

    The client has requested that the content box on the home page only load if the “home” nav button is clicked.

    Is there a way this can be accomplished? or is it possible to delay the loading of the content box?

    Also.. is it possible to change the font and font size on the home page only?

    Thanks,

    Brent

    #24920
    Bill Robbins
    Moderator

    Hey Brent,

    Here’s one way you could do that. Create a new front page using the blank template and don’t it to your navigation menu. Then have your current home page in the nav menu so that when someone clicks home they see it. That will take care of it without requiring any javascript craziness.

    You can change items on any page/post. WordPress adds a class to the body tag that’s unique to each page and that can be used as a styling hook.

    So for the home page, this would style the content area differently:

    
    body.home #content {
         font-size: 20px;
    }
    

    If you need help changing a specific element, let me know which element and we’ll go from there.

    Bill

    #24924
    brent stewart
    Participant

    Hi Bill,

    thanks for the quick response

    I added a new page and set that to the static page in settings > reading but it still has the title and a blank content box

    is there a way to remove those?

    thanks

    Brent

    #24925
    brent stewart
    Participant

    OK.. i see that i didn’t use the “blank” template. Now that i have the title and content box are gone.

    thanks again

    #24926
    Bill Robbins
    Moderator

    No problem. Have a great week.

    #24934
    brent stewart
    Participant

    Hey Bill,

    Now that i have changed the home page to a blank page, the welcome page only displays once someone click on the home nav button.

    would i substitute “welcome” for “home” in the css you posted earlier?

    thanks,

    Brent

    #24941
    Bill Robbins
    Moderator

    Great follow up question. Outside of the home page and the “posts page” (which gets a class of “blog”) all of the others make use of the page id. To find what to use, visit the page in your web browser and view the page’s source. Look for the opening body tag which should look something like this:

    
     <body class="page page-id-87 page-template-default logged-in admin-bar no-customize-support safari">
    

    What we want from here is the page-id-87 which will let us style just this page’s content. So if the page ID is 87, then the CSS would look something like this:

    
    body.page-id-87 #content {
         font-size: 20px;
    }
    

    Let me know if you run into trouble there,
    Bill

    #24954
    brent stewart
    Participant

    that is great.. and works. :0

    if i want to change the font itself will the following work?

    body.page-id-86 #content {
         font: stalemate;
        font-size: 20px;
    }

    thanks,

    Brent

    #24955
    Bill Robbins
    Moderator

    Glad that worked for you. You can pick a new font as long as it’s available on the user’s computer or loaded on your website you’re good to go.

    Bill

    #24957
    brent stewart
    Participant

    Hey Bill,

    do i change the font in the css as i shown in my previous message?

    thanks,

    Brent

    #24962
    Bill Robbins
    Moderator

    Yes that’s right.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Home page content box load on click only?’ is closed to new replies.