WordPress tutorial: adding author filtering options to the background article list

When there are multiple users publishing articles in our site, in order to facilitate the administrator to view the article list of an author, we can add an author filtering option function in the background article list,. The way to add this function is also very simple. Add the code below to the topic functions.php […]

WordPress displays the registration time of the login user in the frontend

When using WordPress to build a website, some users want to display the user registration time in the frontend, but WordPress does not have this option, so how to realize this function? It’s very simple. Although this function is not common, it doesn’t work much. This function is basically used in a user centric site. […]

WordPress adds the number of SQL queries at the bottom

An excellent woodpress theme is definitely that the less SQL consulting is used, the better. How can we see how many times there are SQL consulting in our theme? The following is a piece of code to check the number of times to load SQL Using the tutorial <span>common <?php echo get_num_queries(); ?> secondSqlconsulting service</span> […]

Some WordPress articles can be seen after comments / replies

If we want to hide part of the content of the article and need the user’s comments and replies to be visible, today’s WordPress tutorial article is just right for you. This function is easy to implement, and can improve the enthusiasm of users, is a very good function. Here is the main core code. […]

WordPress common template function reference document

Basic template file file namedescribe style.css Theme style file index.php Home page template file header.php Header template file single.php Single article template file archive.php Archive / categorize template files searchform.php Search form template file search.php Search template file 404.php 404 template file comments.php Message template file footer.php Bottom template file sidebar.php Sidebar template file page.php […]

WordPress gets the first picture in the article as a thumbnail

If you have a large number of articles on your site, it will be a complicated step to manually set the thumbnails for each article. We shared an article “implementation method of random display of thumbnails for WordPress articles” before WordPress realizes random display of article thumbnails. I don’t know if bloggers will forget to […]

WordPress optimization to add ALT and title attributes to the article image

In WordPress optimization. Image ALT and image title optimization is a very important SEO optimization, but if there are too many images in the article, it will be very troublesome to manually add alt attribute and image title attribute to each image, especially when there are too many images. Of course, there are WordPress plugins […]

WordPress adds links to the specified keywords in the content of the article

function replace_text_wps($text){ $replace = array( ‘Theme King’ => ‘<a href=”https://yijile.com/tag/wordpress/” rel=”tag” >Theme King</a>’, ‘WordPresstheme’ => ‘<a href=”https://wpfans.org/theme” rel=”category tag” >WordPresstheme</a>’, ‘WrodPresscourse’ => ‘<a href=”https://wpfans.org/wplearn” rel=”nofollow” target=”_blank” >WrodPresscourse</a>’ ); $text = str_replace(array_keys($replace), $replace, $text); return $text; } add_filter(‘the_content’, ‘replace_text_wps’); usage method Paste the following code into your own WordPress theme functions.php File. Related Article Two methods […]

Login users display different WordPress menus

If the login user and the non login browser display different menus, the following code can be used: the login user displays different WordPress menus add the following code to the current topic function template functions.php Medium: if( is_user_logged_in() ) { $args[‘menu’] = ‘logged-in’; } else { $args[‘menu’] = ‘logged-out’; } return $args; } add_filter( […]