Again this year’s time! Do what you always want to do, develop new habits of self inspiration, and define what you want to be in the new year. New year’s resolutions are an annual tradition for some people, but they don’t have to promise themselves to break them. If you want to keep your score, WordPress can be the perfect partner to help you achieve your goals and achieve them. Today’s posting will show you how to create a simple goal tracking application that supports one-time goals, habitual goals, decision logs, and uses parts to generate statistics. The
Let’s go! Setting goals is a simple new year project. I want to measure the activity level of the goal based on the number of Posts written for the goal. Is it easy? The easiest way to do this is to set the target to a category and then assign that category to the post. First, goals. The following is some content added as a category, as well as a description of word press: In order to easily distinguish the two different types of goals, I use the two top-level categories of \
Although some code can be used to automatically detect these situations, each habit has different success or failure criteria, so it can be difficult. It is easier to manually determine target progress. If you want to add a new target project, that’s it. End! Now, you need a category system that can help you classify solutions and track progress. You can skip the rest of this tutorial and add new posts to your site. To add a new item, create a post as usual and specify a goal in the habits or a timer category. If a custom is specified, it must be marked as a \
To further develop some project goal tracking of goal tracker, please continue to read. Starting the rest of this tutorial will add new features to existing topics, modify back-end and front-end views, add options, and all other types of sections. Most of them must be placed in plug-ins. However, modifying a topic requires a sub topic. To make it easier to manage, we decided to add all plug-in functionality to the subtopic. Warning: This is not a best practice! If you want to implement the following code on a non personal site, use the plug-in with the subtopic. All functions to be retained when switching topics (for example, modifying the administrator post list and post options) must be moved to the plug-in. The
The theme you selected in this project is cool, and you need the least, so this is the default Tweety fifth theme. Creating a sub theme creating a sub theme is a simple process, but if it has not been set before, the best way is to read the method guide for creating a WordPress sub theme. But here is a brief summary. To create a sub theme, add the folder to the default themes folder. My folder is named goal tracker. Styles in this folder. CSS and functions. Create two PHP files. Then add the following to the style sheet: The
In the load summary 251cd71ebc2d065c1ea3 function file, you must verify whether the style of the parent theme has been applied and add it to the queue, as shown below: Load summary 251cd71ebc2d065c1ea3 in addition, on the shape > Theme screen at the back of the WordPress website, make the sub theme look cool
Screenshot You can add PNG images. You can the image I created below. Male theme picture preview thanks Greg rakozy for providing excellent pictures. If you decide to create your own image, the 880 will pass the theme request × Should be set to 660. The
Some modifications to the WordPress backend not only make the backend view modification target interface cleaner, but also easier to browse. Looking at the list of posts (the figure at the top of this article) can display and work normally, but I want to make sure that some information is not displayed, and there is no need to display duplicate information. Now, let’s remove the comments, tags, and creator columns. When you add new options later, you will add additional information to the posts view. To modify the number of columns used in the post list, you must use the manage_[post\u type]\u post\u columns hook. Where [post\u type] must be the actual post type to apply. The
The hooked function passes an array of default columns. You can add or delete items. We will delete the following three unnecessary columns: comments, tags, and authors. The load summary 251cd71ebc2d065c1ea3 category name is also slightly longer. There is not enough space to display the full name because some columns were deleted. Let’s add an administrator style sheet to provide more space for categories. Let’s create a style first. Post list Post list. Save to a folder in the CSS subtopic. Add the following code to the file: The
Load summary 251cd71ebc2d065c1ea3 what we need to do is put it into the function file. You can do this using the admin\enqueue\u scripts hook and connect only to the post list screen using the get\u current\u screen() function. The load summary 251cd71ebc2d065c1ea3 get\u current\u screen() function provides useful information about all types of the current page. Print it out! Must be called after the admin\u init hook run. Otherwise it will not work. The
After all these operations are completed, you must have the following new post list view: The administrator view modification front end view modification our goal now looks good, but I want to make further modifications (of course!). Before starting the change, you can now see the front-end posts. The post about our goal wants to delete the comment link at the beginning. You also want to delete the \
Second, the bottom of the function contains the code for the comment link. Delete the entire if block at the bottom. Male categories require more work, but can retain all content and use filters to perform heavy work. The shape of the entire twenty15_entry_meta() is as follows: Load summary 251cd71ebc2d065c1ea3 twenty fifth use the get\the\category\u list() function to search the category list. WP includes \/ category template If you view the source code of this function in PHP, the filter will run in the category list.