Hi there,

I'm interested in creating a one page website with wordpress (the one with multiple pages in one with the scrollbar). I was curious whether anyone knows of a great website that has tutorials for this or someone that can give me a bit of information on how to make one.

Thanks!

Recommended Answers

All 2 Replies

What you need to learn is some CSS, and jQuery. Although jQuery's optional, if you're not that familiar with vanilla javascript, then it's a good choice to use.

If you need your content to be fetch from the server, AJAX's needed.
Here's a simple code I made to give you some headsup: JS Fiddle Example <- Check this link

HTML:

<div id="wrapper">
  <div>
    <span>1</span>
    <span>2</span>
    <span>3</span>
  </div>
  <div class="contents showCont">This is content one</div>
  <div class="contents">This is content two</div>
  <div class="contents">This is content three</div>
</div>

JAVASCRIPT:

$(document).ready(function(){
  $("div span").on('click',function(){
    var $this = $(this),
        targetContent = parseInt($this.html())-1;

    //remove the corrent content from view
    $("div .showCont").removeClass("showCont");

    //show the selected content
    $(".contents:eq("+targetContent+")").addClass("showCont");

  });
});

CSS:

.contents{
  display:none;
}
.showCont{
  display:block;
}

/* Nothing important */
div span{
  border: black solid 1px;
}

in wordpress you can control this setting with widgets....... as per your need you need two col website ......... search google you can find many free wordpress theme as per your choice.

here you can find theme.

wordpress.org/extend/themes/browse/popular/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.