Code (coding) (tag)

Get several adjacent posts in one query

There are number of functions in WordPress to get one of the adjacent (neighboring) posts to the current one: get_previous_post() and...

PHP CSV File - Creation and Reading

This article explains how to create and parse CSV files in PHP, including the format, creation of CSV files, reading CSV files, and converting Excel files to CSV.

Creating New Fields for WordPress Comments

There are cases when it is necessary to add custom fields to the WordPress comment form, for example, a field for entering a phone number, address, rating, mood, and so...

Passing Variables by Reference in apply_filters(), do_actions()

Passing variables by reference in WordPress filters and events, and passing objects by reference.

Kama_Post_Meta_Box — Create Posts Meta-fields (MetaBoxes)

In this article I'm going to share a Kama Post Meta Box class, with which you can quickly create meta-fields for posts, just by specifying them as an array. It's a kind...

Number of Elements per Page for WP_List_Table Tables

Tutorial on adding customizable pagination to tables created using WP_List_Table in WordPress admin.

Redirect to a Random Post in WordPress

How to redirect users to a random post in WordPress using PHP code in the functions.php file and adding a link to the template.

Removing Comments in Branches

This article discusses implementing a WordPress hook to delete all child comments when a parent comment is deleted and moving comments to trash and restoring them by...

Table of Contents for Large Posts (kamatoc)

How to create and customize a table of contents for large posts using the Kama_Contents class in WordPress.

Creating Custom Fields Block in WordPress Admin Panel

This article explains how to create a custom fields block in the WordPress admin panel without using plugins, including the creation of the block, filling it with HTML...

Function to display all posts by month of publication

Explanation of a WordPress function to display all posts grouped by the month of publication.

Executable PHP Code in WordPress Posts

Implementing the ability to insert executable PHP scripts in WordPress posts and pages, along with important security considerations.

Search Results Highlighting Without Using Plugins

Enhancing search functionality in WordPress by implementing search results highlighting without using plugins.

Change HTML symbols (< >) to special symbols when commenting

The article explains how to replace HTML tags PRE and CODE symbols with special characters in comments and articles, and provides a code example that demonstrates the...

Kama Quicktags: Code on your website pages

The article discusses the challenges faced while inserting and highlighting code in WordPress posts and introduces the Kama Quicktags plugin to simplify the process.