PHP code example of jtsternberg / cmb2-related-links
1. Go to this page and download the library: Download jtsternberg/cmb2-related-links library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jtsternberg / cmb2-related-links example snippets
// Add a related links field.
$cmb->add_field( cmb2_related_links_field( array( 'id' => 'yourprefix_related_links' ) ) );
$translateable = array(
'description' => __( 'Add links, or select from related content by clicking the search icon.', 'yourtextdomain' ),
'group_title' => __( 'Link {#}', 'yourtextdomain' ),
'link_title' => __( 'Title', 'yourtextdomain' ),
'link_url' => __( 'URL', 'yourtextdomain' ),
'find_text' => __( 'Find/Select related content', 'yourtextdomain' ),
);
$cmb->add_field( cmb2_related_links_field(
array( 'id' => 'yourprefix_related_links' ),
$translateable
) );
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.