Web Design Weekly #305

Headlines Why I changed the way I think about Code Quality John Cobb shares some fantastic advice for becoming a better developer. If you write code, make time for this. (freecodecamp.org) Designers who play with words In this post, Melody Quintana discusses some ways she has found writing to be useful in her design process. She also suggests some lightweight, playful exercises to get the words flowing. (medium.com) Sponsor Web Design Weekly and reach over27,461 passionate designers and developers Articles Best practices for staging environments A topic that isn’t talked…

Automatically create a Google Calendar event when I publish a blog post

I would like to configure my site so that, whenever I create a new blog post in a certain category, an event is automatically created in one of my Google calendars. I would also like to set a parameter on the post that controls when the calendar event is scheduled for. Most of the plugins I’ve found let me display a Google calendar in my site. Instead of that, I want to create Google Calendar events in response to my WordPress posts, so that my activity on WordPress controls what…

Allow Contributor to edit but not update a published post

I have a client that wants to manage the editing process on a CPT called Floor Plan. They want to be able to preview and approve/deny all edits to a Floor Plan. I thought I had a solution by having an Admin account create a Floor Plan and have a Contributor enter the necessary content, finally being approved and published by the Admin. The problem comes when the Floor Plan needs to be updated. Once published, a Contributor can no longer edit a post. If we switch the user to…

Jquery Validation Engine with Conatct Form 7

I am using contact form 7 and it’s working with basic validations. But i have to do some advanced validation. So i have to use https://github.com/posabsolute/jQuery-Validation-Engine. How can i use vaidation engine with Contact form 7? Source: https://wordpress.stackexchange.com/feeds

Add file upload with validation to custom form

I have a custom contact form page that I am trying to add an upload field that validates filesize and filetype. Before adding the validation everything worked. <?php /* Template Name: Contact-Page-with-upload * * A Custom PHP Contact us page. Add or change form fields on line 28 and in the form itself. * Jquery is used to add/remove Bootstrap has-error class to invalid fields. */ /** * Get Error Class * * @return string; */ function getErrorClass($failedKeys, $key) { if(isset($failedKeys) && is_array($failedKeys) && in_array($key, $failedKeys)) { return ‘has-error’; }…

Web Design Weekly #304

Headlines Page speed to affect mobile search ranking Google announced this week that starting in July 2018, page speed will be a ranking factor for mobile searches. Time to make those website even faster 🙂 (googleblog.com) Software rot and the case for the PWA rewrite If you are not on the Progressive Web App train, this article might tip you over the edge. Some great words by Matt Ludwig. (dockyard.com) CSS Grid — Learn all about CSS Grid with Wes Bos (cssgrid.io) Articles What’s New in HTML 5.2? Less than…

Alt text not showing up

Morning all, I have read lots of messages on this subject but am no closer to getting alternative text for images working on my web pages. WP 4.9.2 running the Store99 theme. If I look in one of my posts I see the img text I read about. It looks like this: Is this not correct and if not what can I do to fix it? Source: https://wordpress.stackexchange.com/feeds

map_meta_cap was called incorrectly error?

This is a very odd error that I haven’t been able to find the underlying cause of or the solution yet. Errors showing in various places within the WP Admin; Notice: map_meta_cap was called incorrectly. The post type shop_order is not registered, so it may not be reliable to check the capability « read_post » against a post of that type. Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.) in /public_html/wp-includes/functions.phpon line 4147 Notice: Undefined property: stdClass::$ID in /public_html/wp-admin/includes/dashboard.php on line 491 Notice: Undefined property:…

$_SESSION variables lost during OAuth callback

When I attempt an OAuth handshake, the first step is a GET call to obtain an access code like so. # Redirect to request authorization code $url = $this->get_authorization_url(); header(« Location: $url »); exit; Just before I send this I store the current URL in a $_SESSION[‘last_url’] variable so that after authentication is complete I can redirect it back to the page the user originally attempted. This authorization url uses the client id and secret to obtain an access code which is then returned to my callback script. The problem is the…