{"id":34546,"date":"2024-02-29T11:22:16","date_gmt":"2024-02-29T16:22:16","guid":{"rendered":"https:\/\/otakupahp.llc\/tricks-to-boost-your-wordpress-site\/"},"modified":"2024-05-15T17:47:15","modified_gmt":"2024-05-15T22:47:15","slug":"tricks-to-boost-your-wordpress-site","status":"publish","type":"post","link":"https:\/\/otakupahp.llc\/en\/tricks-to-boost-your-wordpress-site\/","title":{"rendered":"Tricks to boost your WordPress site"},"content":{"rendered":"\n<p>WordPress is a platform that offers a wide variety of features and functionalities, its high level of customization allows you to develop websites attached to the style of each company or product, but did you know that there are some little-known tricks that can take your site to the next level? . These tricks not only improve the functionality of your site, but can also save you time and effort in management and customization. Let&#8217;s discover some of these hidden secrets:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Use Advanced Shortcodes<\/strong><\/h2>\n\n\n\n<p>Shortcodes are shortcodes that allow you to add advanced functionality to your WordPress posts and pages quickly and easily. But, did you know that you can create your own custom shortcodes? Use the following code in your functions.php file to create a custom shortcode.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color has-medium-font-size wp-elements-0f4d16ccce9a18ee18613bbead3e664a\"><code>\n     <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">function<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">my_custom_shortcode<\/mark>() {\n   <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-cyan-blue-color\">  <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">return <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'<\/mark>This is my custom shortcode<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'<\/mark>;\n     }\n     <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">add_shortcode<\/mark>(<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'my_shortcode', '<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">my_custom_shortcode<\/mark><\/mark>');\n        <\/code><\/pre>\n\n\n\n<p>You can then use the [mi_shortcode] shortcode anywhere in your posts or pages to display the content you want.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Hide Plugin Updates<\/strong><\/h2>\n\n\n\n<p>Plugin update notifications can be annoying, especially if you&#8217;re working on a development or testing website. You can hide these notifications using the following code in your functions.php file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color has-medium-font-size wp-elements-9d70e46c2f43e5bfc3639307c53ee487\"><code>    \n    <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">add_filter<\/mark>(<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'site_transient_update_plugins', '__return_false'<\/mark>);\n<\/code><\/pre>\n\n\n\n<p>This will prevent WordPress from showing plugin update notifications in the admin panel.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Customize the WordPress Login<\/strong><\/h2>\n\n\n\n<p>You can customize the WordPress login page to fit the design and branding of your website. Simply add the following code in your functions.php file to change the WordPress logo and logo link:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color has-medium-font-size wp-elements-95524b20156714d137fdd48e4b11069b\"><code>   <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">function<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">my_login_logo<\/mark>() { ?>\n       &lt;style type=<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">\"text\/css\"<\/mark>>\n           #login h1 a, .login h1 a {\n            background-image: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">url<\/mark>(&lt;?php <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">echo<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">get_stylesheet_directory_uri<\/mark>(); ?>\/images\/logo-login.png);\n            padding-bottom: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">30<\/mark>px;\n           }\n       &lt;\/style>\n      &lt;?php }\n  <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"> add_action<\/mark>(<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'login_enqueue_scripts'<\/mark>, <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'my_login_logo'<\/mark>);\n<\/code><\/pre>\n\n\n\n<p>Remember to replace logo-login.png with the URL of your own logo.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Add Custom Columns in the Administration Panel<\/strong><\/h2>\n\n\n\n<p>You can customize the list view of posts and pages in the admin panel by adding custom columns. For example, you can display the date the entry was last modified. Use the following code in your functions.php file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color has-medium-font-size wp-elements-a61283b9fd6e6094e955650627828340\"><code>   <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">function<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">my_custom_column<\/mark>(<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">$column, $post_id<\/mark>) {\n       <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">switch<\/mark> (<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">$column<\/mark>) {\n           <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">case<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'<\/mark>Last modification<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'<\/mark>:\n               <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">echo<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">get_the_modified_date<\/mark>(<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'F j, Y g:i a'<\/mark>, <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">$post_id<\/mark>);\n               <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">break<\/mark>;\n       }\n   }\n   <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">add_action<\/mark>(<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'manage_posts_custom_column', '<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">my_custom_column<\/mark><\/mark>', <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">10, \n   2<\/mark>);\n   <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">add_filter<\/mark>(<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">'manage_posts_columns', 'add_custom_column<\/mark>');\n<\/code><\/pre>\n\n\n\n<p>These little-known tricks will allow you to further customize and optimize your WordPress site in ways you may not have known were possible. From creating custom shortcodes to customizing the login panel, these tricks will help you take your website to the next level while saving time and effort in the process. Experiment with these tricks and discover how to improve the functionality and appearance of your WordPress site!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is a platform that offers a wide variety of features and functionalities, its high level of customization allows you to develop websites attached to the style of each company or product, but did you know that there are some little-known tricks that can take your site to the next level? . These tricks not [&hellip;]<\/p>\n","protected":false},"author":226,"featured_media":34544,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"none","_seopress_titles_title":"WordPress Secrets: Tricks to Boost Your Site","_seopress_titles_desc":"Discover little-known tricks to optimize and customize your WordPress site. From custom shortcodes to login customization.","_seopress_robots_index":"","_joinchat":[],"footnotes":""},"categories":[213],"tags":[226,256,255],"class_list":["post-34546","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-en","tag-code","tag-tricks","tag-wordpress-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/posts\/34546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/users\/226"}],"replies":[{"embeddable":true,"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/comments?post=34546"}],"version-history":[{"count":0,"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/posts\/34546\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/media\/34544"}],"wp:attachment":[{"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/media?parent=34546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/categories?post=34546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/otakupahp.llc\/en\/wp-json\/wp\/v2\/tags?post=34546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}