Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other When can I hard code wordpress pages?

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #27661
    cheese
    Member

    I am using wordpress to build a site for someone (first time) but I am sometimes struggling with when and where I can hardcode pages and I’m hoping that someone can help, I’ll try to explain.

    The site will have 5 main pages/sections i.e. home, about, contact, news and events, services

    So I started off creating the homepage (home.php in the theme folder) and hard coded the welcome message, navigation and a feed that I am going to pull from a youtube channel. So this page is a static page that will never need updated, yet I have read on some sites that it I should be creating this page as a normal page with wordpress and assigning it as the static front page in settings, is there a right or a wrong way to do this? I don’t want this site to go live and fall over in 5 minutes.

    The other question I have is about the news pages. Again I just need this to be a static page, it will be displaying all of the news items and events items (basically a directory of recent news and events), I am just going to create a category for news and a category for events, then write the php to display the most recent 10 posts for each section. Can I create this page as part of the template and just link to it?

    Essentially this person only needs to be able to add news and events posts to their site and be able to edit the contact page so that they can add additional information about where they can be contacted at certain times. Other than that the site will be either static pages in the traditional sense that they are just text, or static in that they will just be pulling information from the wordpress database or from feeds on other sites, but they will not need edited.

    Any help is much appreciated, I’m twisting my brain trying to work out which way is best to do things.

    #78454
    Chris Enloe
    Member

    It almost sounds like you are unintentionally trying not to use the awesome power of WordPress. I would just suggest reading on some of the WordPress codex, and seeing how you can utilize WordPress, instead of making it hard on yourself.

    #78374
    cybershot
    Participant

    I would suggest that you purchase a theme that would work for him over at themeforest.net. They are cheap and come with huge options

    #78383
    Eclipse
    Member

    Make a page “home” within WordPress dashboard and assign the home.php template at the bottom-right(ish) of the screen.

    Like Chris said above, read the codex over at wordpress.org

    I think you wanna make the news-section a blog instead of a static page. That way your client can write and publish the news him-/herself. That’s the reason why people wanna use WordPress in the first place.

    #78394
    cheese
    Member

    the puropse of me hard coding the pages was to make sure that the code isn’t changed by the user and that all they can do is add news items.

    The next thing I was actually going to ask was if anyone had any experience changing the backend to only allow the editing of pages and posts.

    #78395
    Bob
    Member

    Well, you can give various roles to people. To me, it seems the Author rol is the one you want: http://codex.wordpress.org/Roles_and_Capabilities

    #78396
    cybershot
    Participant

    what Eclipse was trying to tell you is the way you would want to go. You can make templates for wordpress pages. What you do then is go into the admin area, create the page called news and then on the right side of the admin page, you can see there is a drop down menu where you can assign templates to that page. So you can create a news.php file and assign it to the news page. You can also assign categories to pages so that they can easily update that page.

    #78397
    cheese
    Member

    Thanks for this Bob, I have bought 4 wordpress books from Amazon trying to get to grips with their themes and the framework. I have been asked by a few people to work on wordpress sites this past couple of months.

    Is it just me or do you find the wordpress forum to be unhelpful, maybe it’s just me.

    #78398
    cybershot
    Participant

    I find it to be unhelpful also. There are much better forums like this one where you will get better help. Worpdress forums usually just send you back to the documentation.

    #78402
    jamygolden
    Member

    Have you looked at Digging into WordPress?

    #77434
    hardik
    Member

    @cybershot

    use hooks so you don’t make any default functionality break when you update. and it’s better to know system first then to do some custom code or else you will break something and you will know when you update the main system

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘Other’ is closed to new topics and replies.