Coder Social home page Coder Social logo

Homepage widgets about govpress HOT 3 CLOSED

lukefretwell avatar lukefretwell commented on July 28, 2024
Homepage widgets

from govpress.

Comments (3)

devinsays avatar devinsays commented on July 28, 2024

I added a home page template and updated the theme so that the home page hero and icon menu show based on the is_page_template('templates/home-page.php') conditional.

I also pulled the home page hero and icon menu code out of header.php (to make it more readable) and included it in a template partial (above-home-page.php). This potentially makes it more extendable and reusable.

I've been reluctant to implement this template fully because it is very proscriptive. I could see use cases where:

  • The user would prefer to have four posts show at the top instead of three
  • The user would prefer to have a message at the top, and then recent posts
  • The user would prefer not to have recent posts, but still wants a widget area

I often get support requests for changing small items like this in themes I've made. On the other hand, being proscriptive makes for a quicker set up and a lot let options overhead. Difficult balance.

Let me think through this a bit more. I am considering a shortcode or meta fields to manage the number of items displayed and order.

Feedback or further thoughts welcome.

from govpress.

lukefretwell avatar lukefretwell commented on July 28, 2024

Agree on comments. Perhaps being able to make it widgetable below the icons in the main area would suffice?

from govpress.

devinsays avatar devinsays commented on July 28, 2024

This was updated as part of this commit:
acf8584

from govpress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.