Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Need advice on using WordPress

Options
  • 07-12-2015 9:39pm
    #1
    Registered Users Posts: 5,687 ✭✭✭


    I think I'm finally grasping the template hierarchy, but I'm struggling to wrap my head around front-page.php and how to properly implement it. I know what it's for - A static home page. I also understand that WordPress is entirely dynamic so I don't think I have this implemented incorrectly.

    At the moment my front-page.php is entirely hard-coded and designed the way I want it to look. Custom spacing, different font-sizes, etc. This means it is not possible to edit the home page from within WordPress itself. I am assuming this is not correct. I believe the correct way of implementing this is to have front-page.php use a function to output the contents of the 'Front Page' that I create from within the GUI?

    If this is correct, this leads me to some further questions - How do I style the front page to my liking, i.e. custom background images on each div, left-aligned in some section, right-aligned in others. Themes are supposed to be somewhat generic. Perhaps generic isn't the right word to use - Each element should be given a custom style within styles.css and this will be applied throughout the site. Let's say for example I have one specific paragraph I want to have left-aligned white font. Another paragraph I want right-aligned black font. Another paragraph I want to have selfie.png as the background image. This is further confusing me.

    Someone advised me that I would need to widgetize the front page to apply custom styling elements. he more I'm looking into this, the more I'm starting to think that WordPress is not an ideal solution. If anything this has made my life far more complicated needlessly. I had chosen WordPress for one reason only - So that my uncle can upload new photos to the web site easily in a blog-style format, i.e. "Here is some work we did today for a customer!". To get the functionality I'm looking for feels 'hackish' and more like a work around. Can I just implement the 'Gallery' page in WordPress and leave everything else hard coded?


Comments

  • Registered Users Posts: 241 ✭✭fcrossen


    I doubt you need to use a front-page.php file.

    Have a look at this:
    - https://codex.wordpress.org/Creating_a_Static_Front_Page

    You can create a page and assign it as your front page. It is less flexible than your approach but requires no coding.

    Re: your styling questions, you should create a child theme and add your own CSS rules to it. See:
    - https://codex.wordpress.org/Child_Themes


  • Registered Users Posts: 6,501 ✭✭✭daymobrew


    Danger781 wrote: »
    Someone advised me that I would need to widgetize the front page to apply custom styling elements.
    This is how StudioPress implements their front pages. It does make it reasonably easy to change the content, though it does mean that a site owner, if they are not careful, can easily break the front page.

    I am working on a portfolio site (for a landscaper). For each category of materials used there is a description at the top of the page. To make it easier to edit this description I display a page with the same slug (url) as the category slug. I did this because the category description does not provide a wysiwyg editor.

    So, don't be overly afraid of having restraints on how stuff is organised or displayed. It will help make the site more robust.


Advertisement