Display all Active WordPress plugins
Here is a simple WordPress plugin that will create a [activeplugin] shortcode: Add it as plugin and activate, then add shortcode [activeplugins] anywhere on your website and it will display all active plugins:
Here is a simple WordPress plugin that will create a [activeplugin] shortcode: Add it as plugin and activate, then add shortcode [activeplugins] anywhere on your website and it will display all active plugins:
While developing a custom site I was in a need to represent how many minutes/hours/days the post was published ago instead of the published date. The logic of the code is simple: TIME DISPLAY less than 1 hour XX minutes ago 1 – 24 hours XX hours ago 24 hours – 7 days XX days … Read full article →
In this article I will cover 5 different methods on how to open all links in new tab on WordPress website. To force opening all links in a new tab there are couple of solutions: 1. WordPress plugin Open Links In New Tab is a WP plugin that opens internal and external links in a … Read full article →
Are you looking for the best WooCommerce product image zoom plugin? Are you considering adding zoom options to your e-commerce products? Here are some of the best WooCommerce product image zoom plugins available on the market. Why you should use product image zoom plugin for your WooCommerce store? YITH WooCommerce Product Gallery & Image Zoom The YITH WooCommerce Product Gallery & Image … Read full article →
To put a string after the price of WooCommerce product and cart pages, use the WooCommerce filters woocommerce_cart_item_price and woocommerce_get_price_html Add the following code to your active theme functions.php file. Make sure to change <span class=”price-suffix”>TEXT AFTER THE PRICE</span> with your text or HTML code. NEXT: How to Add text before the price in WooCommerce
This WordPress snippet will add an “edit page” link on the WordPress posts and pages. Only users who are logged in and have the necessary rights to edit that page will be able to see this link (administrator or author). Add the snippet to the theme page where you want the link to appear, for … Read full article →
In this article, we’ll add the next and previous links on a WordPress theme. First We declare the previous and next variables: Then to show them inside the post, add the following snippets to the theme’s single.php file: If you want to further customize the links and maybe even display post name inside the links, … Read full article →
In some cases, you may need to add a function to your WordPress website, either to hook something into the theme or use a filter to change something in the theme. One method of making changes to your site using code snippets is through the use of the theme functions.php file. To edit PHP files make sure … Read full article →
Step 1. Add the following inside your theme functions.php file or create a new Child theme first and add the code to it: Step 2. Add the shortcode [total_posts] anywhere on the website where you want to display the total number of posts: And it will display the number. 🙂
Add the following to your theme functions.php file: Source: WordPress搜索功能结果只有一个时直接跳转到结果文章页面