So after a time learning and practicing, I realized there are some ways to get rid of multi-layered if-else nested conditions.
I have been working with WordPress for a while and one thing that irritates me is that the functions.php contains a lot of codes. This makes the file looks messy and hard to follow. Check out from here some methods to improve this.
This post shows you how to make a redirect that all 404 archive pages will be forwarded to the blog post page, or a new page that you define.
In general, code refactoring refers to the process of changing bad codes into cleaner, purposeful, human-readable, reusable code in order to be cost effective, easy to maintain and collaborate, and probably a better performance.
1. Task description There are two custom fields made with Advanced Custom Fields Pro plugin: Video Tutorials and Video Tutorial Sections. Video Tutorials: has a repeater field that include Video name (Text), Video URL from Youtube (Text), and Video section (Select). This will display under a page called Video Tutorials. Video Tutorial Sections: a repeater […]