Page anchors can be great for single page sites, or sites with long content that need to be navigable. However, you may not want you client digging around in the text view of their WordPress editor…I’m sure they don’t want to be in there either!
A little lesson in Client love
I’m a huge advocate for “Client Centric UX”. What I mean by that is focusing as much on the client’s user experience as we do on their target market’s user experience. Having a simple to use WordPress admin goes right along with this concept. Not everyone is familiar with WordPress…shocking, I know. Furthermore, there are a lot of people who are fairly tech-savvy but have no concept of what a “blog” does or what a “post” is. Read More
There are a lot of scenarios I can think of where you may need to do something like this, but let’s say for this particular example you would like to make your client’s life easy by allowing them to upload images to a post, and then having those images automatically output into an image slider on their published page…no plugins, no shortcodes, just magic.
So, you want to return some values from your WordPress Custom Fields (post_meta) on condition those values exist, eh? Don’t worry…it’s easy!
I’m assuming you have already figured out how to return your Custom Field values, but in case you haven’t, here is some general information from the codex:
$meta_values = get_post_meta($post_id, $key, $single);
This function returns the values of the custom fields with the specified key from the specified post. (Source: Function Reference/get post meta)
The default size for WordPress’s avatars is 48px…pretty small. A lot of sites these days are using much larger avatars, a trend that I really like. I wanted the avatars on this site to be larger, so I did a little searching and found that (of course) WordPress has a built in parameter that allows us to make this change easily.