I created a wordpress theme based on HTML template from internet, below you can see what part of theme did i make and how i did it
- Custom logo with displaying Site title and tagline
- Registrate wp nav menu - Top Menu
- Offer header is the template-part
- I use ACF on every page that use Offer Heaader - so Title and Under Title texts are apply to be change
- Background image can be changed
- If user didn't set an image - it will be default image
- It uses a ready function Breadcrumbs -
ecoverde_the_breadcrumb()
- Displaying the title (not the same in property card)
- Posts are displayed with WP_Query with some arguments
- Type of Property depends on the taxonomy used
$term->name
- Price displaying depends of what type of property it is. Rent - $300 / mo, Sale - $300
- Almost every feature display only if it's not empty
- Max lenght of title is 50 letters, then '...'
- Displaying h1 title of the page
- Replace / with < / br >
- Title Desc with ACF
- Main background image change with ACF
- If doesn't set - will be replace by default image
- Offer Header
- Posts
- User can choose how many posts will be shown
- This file is a template that you can choose in adding new page
- Breadcrumbs
- Offer Header
- I thought it will be good idea to add tabs to filter post
- I used isotope js file (AJAX filter that uses classes)
- It's only small issue with pagination, i find the solve, but it's with js - Solve
- Pagination
- It's a Custom Post Type that also use Taxonomy. To make CPT i used CPT UI plugin
- Breadcrumbs
- I changed h1 and h2 tags because of SEO, people will search "The sky home", not "Property Details"
- Display Title (as the_title) and Description (as the_content)
- Other fields filled with ACF
- Most of fields are not required, because it depends from what type of apartment it will be (for example: Flat, House, Sea House etc...
- I change html by removing bootstrap, insted of it i make width 33% and float left. In previous case if some feature is empty - it just will be hidden but will stay in the same column. Now if some of features is empty another feature will take its plase
- If description is empty people will see the message: "Oops, it's empty. You can return to the features tab"
- The entire footer is made up of widgets
- All menu links are with icons, so i made a JS code after < /footer > on 23th line. If shortly: i add < span > tag with class of icon before < a > tag in < li > tag
:)
- All menu links are with icons, so i made a JS code after < /footer > on 23th line. If shortly: i add < span > tag with class of icon before < a > tag in < li > tag
- Menu widgets are workable, you can click on every page
- You can see all the pages in footer. Here i use page.php file. Nothing special, breadcrumbs and content
- ACF
- CPT UI
Here you can see changes that i made in second version of the website
- Main Settings
- User can choose how many posts will be shown on the front-page
- Social Media Settings
- User can fill in links to his social media
- Links will display with selfmade plugin 'Social Media'
- This plugin will display social media icons with shortcode [social_media] anywhere you want
- If user didn't fill in the field of social media it will not be shown
- Now the number of posts is set on theme settings in admin
- Code is cleaner
- register_post_type now in functions.php, plugin cpt ui was deleted
- register_post_type now in functions.php, plugin cpt ui was deleted
- Tabs Have been redone without isotope
- Were created new child pages Rent and Sale and now only related posts are shows
- All scripts were deleted
- Offer block with id, so now when people click on tab it's scrolling down to this block
- Code is cleaner
- register_post_type now in functions.php, plugin cpt ui was deleted