As I’m discovering, designing, developing & deploying websites, I’m sharing what I’ve learned (usually the hard way) in this journal. I've learned so much through the amazing open source community, now it's time to give back!
Let’s say you just registered a Custom Post Type in WordPress called “products” and have added the CPT archive page to your site’s main menu. If you’ve styled your menu to react to the .current_page_item class, then you will see the menu item change when you are at www.yoursite.com/products. This is the expected behavior and everything is working!
However, if you were to navigate to a single post within the Custom Post Type, there is no class on the parent menu item to allow you to target it if you wanted to add styles. In my case, I like to keep the parent item highlighted, so if someone is viewing www.yoursite.com/products/product-1 it makes sense to me that “Products” in the main menu would remain highlighted – the site visitor is STILL technically viewing products!
This is Part Two of a three part tutorial on creating custom page templates for WordPress. In this tutorial I will be covering the process of translating design into code for a page template. We will take a look at:
Planning the markup based on the design.
Coding the layout into HTML and adding responsive classes (based on the grid included in the Bones Starter Theme).
I wrote a similar post explaining how to send an email notification from WordPress when standard and custom profile fields are updated. A commenter on that post was asking if this was possible with the extended profile fields that you setup in BuddyPress. Well, of course anything is possible…it’s just a matter of figuring it out ;)
I’ve had some requests in the past from clients who want to be notified when WordPress users change information in their user profile, easy enough for the most part. However, a recent client asked to be notified when specific information was changed, mainly, contact related info. This would include their email address, their phone number and their mailing address. No big deal, or so I thought…