• Steps
    1. For this purpose install and activate the following two plugins
    2. Advanced Custom Fields
    3. Advanced Custom Post Types
    4. Under wordpress admin page, find menu item called “Content Types”
    5. Create the type you want.
    6. Under “Custom fields” create field group.
    7. At the selected field group, create under location, a rule that connects type to fields.
  • Veiw more info at the following POST.

Read the following post in order to be able to limit editing and viewing post or post-types to post creator only:

01. https://premium.wpmudev.org/blog/how-to-limit-the-wordpres-posts-screen-to-only-show-authors-their-own-posts/

02. This is the plugin:

<?php
/*
Plugin Name: Simplify Post Edit List
Description: Show only the author's posts in the edit list
Version: 0.1
License: GPL
Author: Sarah Gooding
Author URI: http://untame.net
*/

function mypo_parse_query_useronly( $wp_query ) {
    if ( strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin/edit.php' ) !== false ) {
        if ( !current_user_can( 'update_core' ) ) {
            global $current_user;
            $wp_query->set( 'author', $current_user->id );
        }
    }
}

add_filter('parse_query', 'mypo_parse_query_useronly' );

03. The line in red can be modified as follows:

a. Limit to Edit: strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin/edit.php' ) !== false
b. Limit to All admin area: strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin' ) !== false
c. Limit to All admin area: strpos( $_SERVER[ 'REQUEST_URI' ], '/[Post-Type here]' ) !== false
d. Combination of IF: 
if ( strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin' ) !== false || 
strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin/edit.php' ) !== false || 
strpos( $_SERVER[ 'REQUEST_URI' ], '/[post-type]' ) !== false )


 

  1. Advance Custom Fields
  2. Display ACF values at a post
    • Method 1
    • Metod 2
      • Use Short codes
      • Example: [acf field="{$field_name}"]
  3. How to Disable the Gutenberg WordPress Editor

General: Here a plugin that will display a list of posts will be demonstrated.

Read more about developer resources here: https://developer.wordpress.org/

Top-10-WordPress-Plugins-That-You-Need-To-Be-Using-In-2014

 

Step 01: Plugin name will be DisplayListOfPosts

Step 02: Create a directory under wordpress-root\wp-content\plugins\DisplayListOfPosts

Step 03: Create a file under that directory called: DisplayListOfPosts.php

Step 04: The the following content to the plugin file:

<?php

/*
Plugin Name: Display List of Posts
Plugin URI: http://www.flash-jet.com
Description: A plugin demo that will display list of Posts
Version: 1.0
Author: Gabriel Magen
Author URI: http://www.flash-jet.com
*/

?>

Step 05: From wordpress admin panel, activate the new plugin.

Step 06: Here an action of adding option to admin menu will be demonstrated. Add the following code to file:

//adding action to admin menu and bind it to function name

add_action(‘admin_menu’,’DisplayListOfPosts_admin_actions’);

function DisplayListOfPosts_admin_actions() {

add_options_page(‘Display List Of Posts’,’Display List Of Posts’,’manage_options’,__FILE__,’DisplayListOfPosts_admin’);

//add_options_page(HTML Page title,Settings Submenu,hook only admin can see,php constant,function that will display the posts list);

}

function DisplayListOfPosts_admin() {

}

Step 07: Replace function DisplayListOfPosts_admin()  with the following::

function DisplayListOfPosts_admin() {

global $wpdb; //wpdb wordpress database class
$mytestdata=$wpdb->get_results(“select ID,post_title from $wpdb->posts”); //get a query into wpdb class
echo “<br>Display list of posts:<br>”;

echo “<table border=1>”;//display the results as a table

foreach ($mytestdata as $singleraw) //loop inside the query
{
echo “<tr>”;
echo “<td>”.$singleraw->post_title.”</td>”;
echo “<td>”.$singleraw->ID.”</td>”;
echo “</tr>”;
}

echo “</table>”;

}

images (6)

 

Step 08: Final code:

<?php

/*
Plugin Name: Display List of Posts
Plugin URI: http://www.flash-jet.com
Description: A plugin demo that will display list of Posts
Version: 1.0
Author: Gabriel Magen
Author URI: http://www.flash-jet.com
*/

add_action(‘admin_menu’,’DisplayListOfPosts_admin_actions’);

function DisplayListOfPosts_admin_actions() {

add_options_page(‘Display List of Posts’,’Display List of Posts’,’manage_options’,__FILE__,’DisplayListOfPosts_admin’);
}

function DisplayListOfPosts_admin() {

global $wpdb;
$mytestdata=$wpdb->get_results(“select ID,post_title from $wpdb->posts”);
echo “<br>Display list of posts:<br>”;

echo “<table border=1>”;
foreach ($mytestdata as $singleraw)
{
echo “<tr>”;
echo “<td>”.$singleraw->post_title.”</td>”;
echo “<td>”.$singleraw->ID.”</td>”;
echo “</tr>”;
}
echo “</table>”;

}
?>

Based on: