WordPress

How to create a table in WordPress admin panel. Part 2.1.
How to create a table in WordPress admin panel. Part 2.1.

Hello, dear readers and guests of the blog. Yes, yes, yes. I'm lazy and haven’t written in a while. It’s easy to quit, but much harder to start writing again. But I really hope that this will change soon. I’ve gained quite a bit of interesting knowledge in WordPress — created a couple of plugins, completed several backend projects. As for frontend — still the same old story.

Now, to the point. In this article, we’ll extend the capabilities of our class — adding a search form, styles, checkboxes, and bulk actions on records. So, let’s get started.

You can find the first article in this series by following this link. Since some time has passed, I’ve changed the names of some classes and methods, but the purpose and tasks remain the same. I believe a bit of confusion will be good for you — it’ll make you think a little more carefully.

read more...

How to Prevent Comment Authors' Links from Being Indexed in WordPress (jQuery Version)
How to Prevent Comment Authors' Links from Being Indexed in WordPress (jQuery Version)

Hello! In this article, we’ll explore another method to hide comment author links to their websites. Previously, we looked at ways to do this using plain JavaScript and CSS. But this time, we’ll use the power of the jQuery framework.

As before, all code edits will be done with the "Twenty Twelve" theme installed.

These operations are fairly simple, and I don’t think you’ll have any major issues. But if you do — feel free to ask questions in the comments.

read more...

How and Where to Install Shortcode in WordPress
How and Where to Install Shortcode in WordPress

The task is quite simple and is frequently discussed on blogs dedicated to WordPress and making money online. It is published with the same purpose as the previous one — to reference it from other articles instead of duplicating the same text ten times.

According to best practices (or at least to keep things neat), shortcodes are usually created in the “functions.php” file of the active WordPress theme. For example, if your site is using the “twentytwelve” theme, open the file located at “/wp-content/themes/twentytwelve/functions.php”. Use search to find the line “add_shortcode”, i.e. where existing shortcodes are located. Once found, scroll below the last existing shortcode and insert yours (this is done purely for neatness). Alternatively, scroll to the end of the file and add your shortcode there.

read more...

How to Create a Description for a WordPress Plugin
How to Create a Description for a WordPress Plugin

To avoid duplicating the same plugin description code for the 150th time, I decided to do it once and fully describe it in this article. In all other articles — I’ll just refer to this one.

So, in order for WordPress to recognize which plugin is located in the «/wp-content/plugins/» directory and be able to install it, you need to declare it properly (more precisely — write a header). To do this, at the very beginning of the main plugin file, create the following comment (providing your plugin details, of course):

read more...

How to Create a Table in WordPress Admin Panel. Part 1
How to Create a Table in WordPress Admin Panel. Part 1

In this article, we’ll continue developing our shortcode creation plugin and take a look at how to create tables in the WordPress admin panel. Of course, we could do without a table by defining an N-number of fields for our shortcodes. But having the ability to create an unlimited number of them will be an invaluable advantage for our plugin. Moreover, this gives us a good opportunity to deepen our programming skills within WP.

As usual, let’s start from the beginning — creating the plugin files (in future articles, this will not be repeated). Inside the “/wp-content/plugins/” directory, create a folder named “wp2fl-lessons-table-create-part1”, and inside it — the file “wp2fl-lessons-table-create-part1.php”.

read more...