This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom Taxonomies | |
function SP_PS_register_recommendations_taxonomies() { | |
// Type of recommendations taxonomy | |
$labels = array( | |
'name' => 'Type of recommendations', | |
'singular_name' => 'Type of recommendations', | |
'search_items' => 'Search Types of recommendations', | |
'all_items' => 'All Types of recommendations', | |
'parent_item' => 'Parent Type of recommendations', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: members_cpt | |
Plugin URI:https://shaunpalmer.co.nz | |
Description: members_cpt Custom Post Type & taxonomies that adds custom post types | |
Version: 0.1.6 | |
Author: shaun palmer | |
Author URI: [email protected] | |
Text Domain: sp-ps-td-shaun-palmer | |
*Tested up to: 5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp_register_style('my_plugin_name_dashicons', plugins_url( MY_PLUGIN_NAME.'/css/my-plugin-name.css')); | |
wp_enqueue_style('my_plugin_name_dashicons'); | |
add_menu_page('My Plugin Settings', 'My Plugin Name', 'administrator', MY_PLUGIN_NAME, 'my_plugin_settings_page', 'dashicons-hanger'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//change to the right function name | |
function spwp_register_post_type() { | |
$singular = 'members Page'; //change to the right post type name | |
$plural = 'members Page'; //change to the right post type names | |
$detailed_description = 'description'; //change to the right description | |
$textdomain = 'sp-ps-td-shaun-palmer'; //change to the right text domain | |
$spwp_post_type = 'spwp_register_post_type'; //change to the right function name | |
$labels = array( | |
'name' => $plural, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sp_sp_resources() { | |
wp_enqueue_style('style', get_stylesheet_uri()); | |
} | |
add_action('wp_enqueue_scripts', 'sp_sp_resources'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: tutorial | |
Plugin URI:https://shaunpalmer.co.nz | |
Description: All tutorial Custom Post Type & taxonomies that adds custom post types | |
Version: 0.1.6 | |
Author: shaun palmer | |
Author URI: [email protected] | |
Text Domain: sp-ps-td-shaun-palmer | |
*Tested up to: 5.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Landing Page Boiler Plate */ | |
$key = lp_get_parent_directory(dirname(__FILE__)); | |
$path = LANDINGPAGES_UPLOADS_URLPATH ."$key/"; | |
$url = plugins_url(); | |
/* Define Landing Pages's custom pre-load hook for 3rd party plugin integration */ | |
do_action('lp_init'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ahmadawais/create-guten-block | |
https://github.com/ahmadawais/create-guten-block | |
or | |
genesis custom blocks- wordpress.org /plugins/genesis-custom-blocks | |
or | |
ACF custom blocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SP_SP_Block_editor_fonts(){ | |
//enqueue google fonts & styles | |
wp_enqueue_styles(‘SP_SP_Block_editor_fonts’, 'https:///google_fonts_string'); | |
} | |
Add action( 'enqueue_block_editor_assets' , 'SP_SP_Block_editor_fonts'); | |
//https://wp.zacgordon.com/2017/12/26/how-to-add-javascript-and-css-to-gutenberg-blocks-the-right-way-in-plugins-and-themes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="robots" content="noindex" /> |
OlderNewer