The Revivalist Scope
WP theme build
This project spec was to build a new theme from supplied PSD base designs, along with new post loop functionality, custom home page view.
- Create WP layout and theme template files
- Create new post loops
- Create slider fresh posts function
- Add & style a series of plugins
- create custom meta data & custom post types to manage slider ‘Fresh News’
- Initial build
The initial start point was creating a completely fresh set of theme template
and functions files. This was to be a clean build adhering to all accepted current
WP conventions. The initial site template files were written to html5 strict Standards
for markup within the themes control, the layout was conceived as a fully fluid one using media query breakpoints to manage the layout at wider full screen sizes.
- Theme Functionality
Although not in original specifications care was taken to provide as much theme flexibility as possible for the client,
this included a series of registered widget areas to provide as much flexibility for the display of sidebar content depending on the type of
page being viewed and also the ability to choose at what point in the column content might start from; along with full-width templates should they be required.
A number of custom widgets were provided for convenience supplied via a widgets file include into the main functions file.
As the theme had an awkward requirement of differently styled widgets and to avoid hard
coding those too much a widget for each type was provided that could take text and/or a link for an image attachment.
A specific short post loop widget was provided which allows the user to set the post tag to query on, quantity to display, and displays a featured thumb if available.
- Custom Posts & Loops
This site theme had a number of specific post views required, for these custom post
loops were written that gave greater flexibility for visual styling these were
all managed from a specific functions file to keep things easier to manage.
The main WP query was modified to create a sticky post ‘Featured’
entry and a shorter post loop for the latest posts, these worked by modifying
the pre_get_posts hook as the preferred approach. In addition to the post loops a
custom post type was implemented that allows the site admin to add posts displaying a featured thumb image and custom link.
For the fresh posts requirement a custom post type was created and a custom loop query run on just these posts, a simple jQuery slider was
then built which used the looped posts from the query to slide a series of posts horizontally. The
custom posts were provided with an additional piece of metadata allowing the user to add a link the slider posts are
checked to see if a link was provided and if it was that link is used for the image and title, otherwise the images and titles default to the site post entry.