Skip to content

Commit

Permalink
Merge pull request #16 from FreddyFY/v5_readme
Browse files Browse the repository at this point in the history
Add v5 include-instruction
  • Loading branch information
TimPerry authored Apr 3, 2017
2 parents 81df521 + dd6c105 commit c5641df
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,21 @@ This add-on can be treated as both a WP plugin and a theme include.
1. Copy the 'acf-post-type-selector' folder into your theme folder (can use sub folders). You can place the folder anywhere inside the 'wp-content' directory
2. Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-post-type-selector.php file)

##### ACF Version 4
add_action( 'acf/register_fields', 'my_register_fields' );

function my_register_fields() {

include_once( 'acf-post-type-selector}/acf-post-type-selector.php' );
include_once( 'acf-post-type-selector/acf-post-type-selector.php' );

}
##### ACF Version 5
add_action( 'acf/include_fields', 'my_register_fields' );

function my_register_fields() {

include_once( 'acf-post-type-selector/acf-post-type-selector.php' );

}

Expand Down
2 changes: 1 addition & 1 deletion acf-post-type-selector.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
Plugin Name: Advanced Custom Fields: Post Type Selector
Plugin URI: https://github.com/iceicetimmy/acf-post_type_selector
Plugin URI: https://github.com/TimPerry/acf-post-type-selector
Description: Provides the option to select a single or multiple post types
Version: 1.0.0
Author: Tim Perry
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "iceicetimmy/acf-post-type-selector",
"description": "Post type selector for Advanced Custom Fields.",
"keywords": ["wordpress", "plugin", "advancedcustomfields", "acf", "custom-post-types"],
"homepage": "https://github.com/iceicetimmy/acf-post-type-selector",
"homepage": "https://github.com/TimPerry/acf-post-type-selector",
"license": "GPLv2 or later",
"authors": [
{
Expand Down

0 comments on commit c5641df

Please sign in to comment.