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
if ( ! function_exists( 'storefront_post_meta' ) ) { | |
/** | |
* Display the post meta | |
* | |
* @since 1.0.0 | |
*/ | |
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: Home Page CPT | |
**/ | |
add_action( 'admin_menu', 'my_admin_menu' ); | |
function my_admin_menu() { | |
add_menu_page( 'My Top Level Menu Example', 'Top Level Menu', 'manage_options', 'example.php', 'myplguin_admin_page', 'dashicons-tickets', 6 ); | |
} |
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
//Auto add and update Title field: | |
function my_post_title_updater( $post_id ) { | |
$my_post = array(); | |
$my_post['ID'] = $post_id; | |
$my_post['post_name'] = ''; | |
$posttypes = array( 'accommodation', 'destination' ); | |
$currentposttype = get_post_type($post_id); | |
if ( in_array( $currentposttype, $posttypes ) ) { |
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
//http://wpsettingsapi.jeroensormani.com/ | |
add_action( 'admin_menu', 'tsumtour_add_admin_menu' ); | |
add_action( 'admin_init', 'tsumtour_settings_init' ); | |
function tsumtour_add_admin_menu( ) { | |
add_submenu_page( 'edit.php?post_type=tour', 'Tour', 'Intro', 'manage_options', 'tour', 'tsumtour_options_page' ); | |
} | |
function tsumtour_settings_init( ) { | |
register_setting( 'pluginPage', 'tsumtour_settings' ); | |
add_settings_section( | |
'tsumtour_pluginPage_section', |
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 | |
if(!empty( $_REQUEST["post_id"]) ) { | |
add_filter('upload_dir', 'tsum_upload_dir'); | |
$upload = wp_upload_dir(); | |
// remove_filter('upload_dir', 'tsum_upload_dir'); | |
function tsum_upload_dir( $upload ) { | |
$id = $_REQUEST['post_id']; | |
$parent = get_post( $id )->post_parent; | |
// Check the post-type of the current post | |
if( "post-type-name-ie-product" == get_post_type( $id ) || "post-type-name-ie-product" == get_post_type( $parent ) ) |
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
[ | |
{ | |
"key": "group_5a7741d53f5b5", | |
"title": "Sales Catalogue", | |
"fields": [ | |
{ | |
"key": "field_5a77425967079", | |
"label": "Sale Catalogue Entry", | |
"name": "sale_catalogue_entry", | |
"type": "repeater", |
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
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /app/public/wp-content/themes/storechild-master/content-single-auction.php on line 175 Warning: file_get_contents(): Failed to enable crypto in /app/public/wp-content/themes/storechild-master/content-single-auction.php on line 175 Warning: file_get_contents(https://maps.googleapis.com/maps/api/elevation/xml?locations=40.7143528,-74.0059731&key=AIzaSyCM1fCTYKPhk6tDCqsVNhcXto6aqjUc0yY): failed to open stream: operation failed in /app/public/wp-content/themes/storechild-master/content-single-auction.php on line 175 Fatal error: Uncaught Exception: String could not be parsed as XML in /app/public/wp-content/themes/storechild-master/content-single-auction.php:176 Stack trace: #0 /app/public/wp-content/themes/storechild-master/content-single-auction.php(176): SimpleXMLElement->__construct('') #1 /app/public/wp-includes/template.php(690): require |
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 | |
/** | |
* Template used to display post content. | |
* | |
* @package storefront | |
*/ | |
?> | |
<!-- https://www.bootply.com/L47vGoEops --> |
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 | |
/** | |
* The Template for displaying product archives, including the main shop page which is a post type archive | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |