WordPress gets the subcategory of the current category

In productionWordPressWhen the theme is often met, how to be inWordPressThe category page displays the subcategories under the current category or displays the subcategories of the category on the article page,Especially when doing Chinese enterprise theme, we must use this skill。Today, I’d like to share with you the functions that I used to call subcategory […]

The method of forbidding the automatic saving of WordPress articles

Before, Xiao Bian talked about it《solveWordPressarticleidA simple method of discontinuity》Mentioned inWordPress自动保存article的时间间隔的问题,And today we are talking about direct prohibitionWordPressarticle自动保存的方法,The method is simple,And it’s focused onfuntions.phpIn the file,The advantage is thatwpThere is no need to reset after the version is updated! Now let’s ban this function! Put the following code in theWordPressThematic funtions.phpwithin,Pay attention to the last […]

WordPress using CSS3 to achieve page fade animation effects

utilizeCSS3Animation properties“@keyframes ”Can achieve some dynamic effects,Specific syntax and parameters can be learned online。这篇文章主要是实践应用一下这个Animation properties,Realize page fade in effect,On foxes24edition、chrome29edition、IE10Passed the test in the test。IE9The browser below does not support this effect。 Fade in code: @keyframes fade-in {         40% {opacity: 0;}     }         0% {opacity: 0;}         100% {opacity: 1;}     #wrapper {           animation-duration: 1.5s;     }   Add the above code directly to the topicstyleIn the style file,And modify […]

WordPress 5.7 introduces a function to check whether an article can be viewed publicly

WordPress 5.7 Two functions are introduced to check whether the article can be viewed publicly。 is_post_status_viewable() before, is_post_type_viewable() Function can be used to register article types by publicly_queryable Setting determines whether the article type is visible to anonymous users 。however,It’s not enough just to determine if you can view specific articles,Because this function only checks for general article type […]

Gitee is unable to push the updated version. The error “updates were rejected” is prompted

There are some collaborative office development times,Or useGITVersion control is better,And some open source software can be downloaded and released inGITHUBperhapsGITEEIterations on easy versions,Otherwise, the latest version will be repackaged every time. But the former is not good at home,So Lao Jiang recently began to use GITEE. It appears when the version is updated: error: […]

WordPress Theme Development – add emoji to comments

staywordpressIt used to be very popular to add expression packs to the comments on the topic,And many websites also include this function。 The implementation is mainly to replace the official expression with its own expression pack,So the quantity is limited。 It’s not just reviews, of course,Background article editor can also add small expressions,There is an […]

WordPress automatically intercepts part of the content of the article as a summary

In the daily release of articles, not every article may have an article summary, so the summary function of WordPress can not meet our needs. This article shared by wptootutorial network introduces a WordPress technique of automatically intercepting part of the content of an article as an article summary, and can customize the number of […]

How to add user defined upload avatar function in WordPress

Friends who use WordPress to build a website should know that WordPress itself does not have the function of uploading a user-defined avatar. If you want to change the avatar, the steps are very troublesome. In our development of a WordPress theme, especially the multi-user theme, it is necessary for registered users to customize the […]