Skip to main content

Extra Fields Plugin

What does the Extra Fields plugin do, and what is its use case?

As indicated by its name, the purpose of the Extra Fields plugin is to add extra fields to the content’s add/edit section.

The default/basic game add section is like this:

If you add an extra field using the “Extra Fields” plugin, for example, if we add a “YouTube URL” field for game content, it will appear like this:

You can also add various other fields, such as custom meta descriptions, developer info, and much more.

These extra fields are displayed in the “Upload Game,” “Remote Add,” “Edit Game,”, “Posts” and “Categories” sections. Currently, extra fields are not implemented for pages.

Guide on how to use the Extra Fields plugin:

First step, go to plugin page.

Select you content type then click “Load extra fields”, then click “Add new”.

The following page will appear:

Click “Add,” and this field should appear in the game content field.

Here is an example of how you can load the value:

In this example, I will load it in the default theme’s game.php and add the following code:

The result will be as follows:

If you are already familiar with “Custom Field” plugin, the purpose is similar. The only difference is that the “Extra Fields” plugin adds fields for specific content types.

IMPORTANT NOTES


If you edit or change the Extra Fields key, the key names for all existing content will not be changed; they will remain as they were. To update or rename all content keys, you need to use the “Rename Content Key” option. This will rename the specific key for all content.

To rename a content key, you must either delete or rename the field key, and the target name (new key) must already exist.

If you delete a field, the content’s key field and its value will still exist. To remove a specific key from all content, use the “Delete Content Key” option.

Sorry for the complexity. I did not make it update the content key automatically when there are changes in the field because I don’t want to alter the current content code structure.