• Resolved jackwright1234

    (@jackwright1234)


    Hopefully this shouldn’t be too hard to answer.

    On the home page I coded within my theme, I want to sell a business. Now, I am developing a theme and my focus isn’t necissarily the content – yet.

    What I want to achieve is having a homepage that has content provided via the wordpress backend and not written in the front-page.php file. I honestly feel like pre-writing HTML content within that file isn’t correct and have resorted to using queries to filter out posts by categories to display them in the right parts of my homepage.

    How do you guys create your homepage? How is your dynamic content delivered? Have you hard coded the content? Or is there a magic way to let other admins edit the content without having to dig into the theme PHP files?

    Thank you. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The requirements for themes in the WordPress repository do not allow themes to supply content. All content must come from the database (or plugins).
    But there are lots of themes available that are not in the WordPress repository. And there are many plugins that are page builders.
    So asking “How do you guys create your homepage?” is a bit vague.

    The WordPress way is to store all content in the database, and the theme only supplies the layout and styles.

    Thread Starter jackwright1234

    (@jackwright1234)

    Thanks for the reply! I wouldn’t say it’s vague if you’ve answered my question like that.

    I’m looking to not download any premade plugins. The theme, ideally, is to be as custom as possible.

    If you don’t mind me asking, if it isn’t too vague, what is the general pattern in supplying content used to sell a service on the homepage? This is data that needs to be managed in the backend by other people yet I am not sure what the industry standard is when it comes to accomplishing this with style. As far as I am concerned just slapping a post in the homepage can look boring. How would I style it?

    • This reply was modified 6 years, 1 month ago by jackwright1234. Reason: Spelling and grammar
    • This reply was modified 6 years, 1 month ago by jackwright1234.

    OK, maybe vague isn’t the right word. You want specifics, but there is no way to gather that information. It is not collected anywhere, and the people that frequent the support forums are people with problems, not people successfully doing all the myriad things they are doing. There is no general pattern; there is only a lot of individuals doing who knows what on their sites.

    The theme, ideally, is to be as custom as possible.

    What you consider ideal is different from most. What you consider custom could in fact be common. What you consider is a theme’s job might be very different from the WordPress way of doing things.

    There’s nothing wrong (and many advantages) with using plugins for functionality. It really doesn’t belong in a theme, which should just format the HTML and that’s it. It should not decide what is on any of the pages or what any of the URLs are.

    If you want dynamic content, you should use a plugin to provide that. The plugin author will have done all the work to get it written, tested, supported, updated.
    Even if you decide you don’t want to use a plugin, you can read the plugin code to see how it is done.

    If you think a particular page needs additional styles, the styles should go in the page, or use classes in the HTML and put the styles for the classes in Additional CSS. (Actually, it’s better to use a plugin like Custom CSS so that it will still be there if you switch themes.)

    Thread Starter jackwright1234

    (@jackwright1234)

    You’ve given me all the information I need thank you! I wasn’t necessarily asking for code, I wanted an idea on how people achieve a certain task but it seems many people have different ways of doing that and when I read that, already half my question was answered. Then you followed up on how which was exactly what I needed.

    Thank you ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Theme homepage, best way to execute it?’ is closed to new replies.