CM Footnotes (CMF) - How To - Add Footnotes To The Post
Adding Footnotes to the post
In the renewed version of CM Footnotes there is only one way to add footnotes - you can do it straight in the post. It is simple to do - you just need to create a definition and then put a shortcode with its ID to the relevant place in the post.
Each post/page can have a set of its unique set of footnotes with definitions. The definitions are displayed in the simplest possible way, as close to their real life equivalent.
Let's consider this process of adding footnotes more detailed.
Creating a Definition
First you need to start editing some post or page. When the plugin is activated a new metabox appears on the bottom of the page - CM Footnotes - Definitions. There are a few columns that you need to fill.
- ID - Here is defined the ID that will be used in the shortcode. You can either use IDs that are created automatically (1, 2, 3...), or you can write here any other ID - it can be for instance letters or special characters, as you can see on the screenshot above.
Example on the front-end:
- Dashicon - You can define an icon for every definition using WordPress icon's set. It will be displayed in the bottom of the page in the footnote list.
Example on the Front-end:
- Delete Dashicon - Click the "X" button to delete dashicon from this definition.
- Definition - This field should contain the definition/explanation, which the link created by the shortcode will link to.
- Tooltip External Link - This field is for adding an external link that will be included to the definition.
- Delete Definition - Click the "X" button to delete this definition.
- Add New Definition - Click the "+" button to add new definition.
Placing the Shortcode
To add a footnote link you just need to put the shortcode anywhere you want in the page content.
The shortcode takes just one parameter - id. As it's already been said before - the value of the parameter can contain numbers, letters or special characters.
So for example you can add shortcodes like:
The parameter has two purposes:
- It identifies the footnote - so you can easily match the link and the definition
- It's the label for the link - so it's up to administrator how the link will appear on the front-end
There are two ways how you can disable or enable footnotes on the post/page.
1) If in plugin settings in the option Display footnotes on are chosen some post types, you can can disable footnotes on some definite post/page of that type.
While editing the post/page find the metabox CM Footnote - Disables on the right dashboard. Then check the option Disable Footnotes on this post/page. You can uncheck this option when you need the footnotes to be displayed again on that post/page. And you can see there a message that says this post type is ON in plugin settings.
2) And the opposite - some post/page types can be disabled in plugin options for displaying footnotes, but you can enable it on the definite post/pages.
While editing the post/page find the metabox CM Footnote - Disables will have another option - Enable Footnotes on this post/page. You can uncheck this option when you need the footnotes not to be displayed again on that post/page. And you can see there a message that says this post type is OFF in plugin settings.
Footnote Link and Backlink
Users can click on the footnote link and they will be automatically scrolled to the bottom of the page to the needed definition. For convenience, users can get back to the place where they were reading the post by clicking the symbol "↑" next to the ID of definition. They will be sent back to the footnote link that they clicked to see the definition.