Wordpress

<?php
// Grab the metadata from the database
$text = get_post_meta( get_the_ID(), 'yourprefix_text', true );

// Echo the metadata
echo esc_html( $text );
?>
add_action( 'cmb2_admin_init', 'cmb2_sample_metaboxes' );
/**
 * Define the metabox and field configurations.
 */
function cmb2_sample_metaboxes() {

	/**
	 * Initiate the metabox
	 */
	$cmb = new_cmb2_box( array(
		'id'            => 'test_metabox',
		'title'         => __( 'Test Metabox', 'cmb2' ),
		'object_types'  => array( 'page', ), // Post type
		'context'       => 'normal',
		'priority'      => 'high',
		'show_names'    => true, // Show field names on the left
		// 'cmb_styles' => false, // false to disable the CMB stylesheet
		// 'closed'     => true, // Keep the metabox closed by default
	) );

	// Regular text field
	$cmb->add_field( array(
		'name'       => __( 'Test Text', 'cmb2' ),
		'desc'       => __( 'field description (optional)', 'cmb2' ),
		'id'         => 'yourprefix_text',
		'type'       => 'text',
		'show_on_cb' => 'cmb2_hide_if_no_cats', // function should return a bool value
		// 'sanitization_cb' => 'my_custom_sanitization', // custom sanitization callback parameter
		// 'escape_cb'       => 'my_custom_escaping',  // custom escaping callback parameter
		// 'on_front'        => false, // Optionally designate a field to wp-admin only
		// 'repeatable'      => true,
	) );

	// URL text field
	$cmb->add_field( array(
		'name' => __( 'Website URL', 'cmb2' ),
		'desc' => __( 'field description (optional)', 'cmb2' ),
		'id'   => 'yourprefix_url',
		'type' => 'text_url',
		// 'protocols' => array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'), // Array of allowed protocols
		// 'repeatable' => true,
	) );

	// Email text field
	$cmb->add_field( array(
		'name' => __( 'Test Text Email', 'cmb2' ),
		'desc' => __( 'field description (optional)', 'cmb2' ),
		'id'   => 'yourprefix_email',
		'type' => 'text_email',
		// 'repeatable' => true,
	) );

	// Add other metaboxes as needed

}
sanitize_email()
sanitize_file_name()
sanitize_html_class()
sanitize_key()
sanitize_mime_type()
sanitize_option()
sanitize_sql_orderby()
sanitize_text_field()
sanitize_title_for_query()
sanitize_title_with_dashes()
sanitize_user()
sanitize_meta()
sanitize_term()
sanitize_term_field()
the_content()
the_excerpt()
next_post()
previous_post()
get_header()
get_footer()
get_sidebar()
get_template_part()
get_search_form()
wp_loginout()
wp_logout_url()
wp_login_url()
wp_login_form()
wp_lostpassword_url()
wp_register()
wp_meta()
bloginfo()
get_bloginfo()
get_current_blog_id()
wp_title()
single_post_title()
post_type_archive_title()
single_cat_title()
single_tag_title()
single_term_title()
single_month_title()
get_archives_link()
wp_get_archives()
calendar_week_mod()
get_calendar()
delete_get_calendar_cache()
allowed_tags()
wp_enqueue_script()
the_author()
get_the_author()
the_author_link()
get_the_author_link()
the_author_meta()
the_author_posts()
the_author_posts_link()
wp_dropdown_users()
wp_list_authors()
get_author_posts_url()
get_header()
get_footer()
get_sidebar()
get_template_part()
get_search_form()
wp_loginout()
wp_logout_url()
wp_login_url()
wp_login_form()
wp_lostpassword_url()
wp_register()
wp_meta()
bloginfo()
get_bloginfo()
get_current_blog_id()
wp_title()
single_post_title()
post_type_archive_title()
single_cat_title()
single_tag_title()
single_term_title()
single_month_title()
get_archives_link()
wp_get_archives()
calendar_week_mod()
get_calendar()
delete_get_calendar_cache()
allowed_tags()
wp_enqueue_script()
the_author()
get_the_author()
the_author_link()
get_the_author_link()
the_author_meta()
the_author_posts()
the_author_posts_link()
wp_dropdown_users()
wp_list_authors()
get_author_posts_url()
the_permalink()
user_trailingslashit()
permalink_anchor()
get_permalink()
get_post_permalink()
get_page_link()
get_attachment_link()
wp_shortlink_header()
wp_shortlink_wp_head()
edit_bookmark_link()
edit_comment_link()
edit_post_link()
get_edit_post_link()
get_delete_post_link()
edit_tag_link()
get_admin_url()
get_home_url()
get_site_url()
home_url()
site_url()
get_search_link()
get_search_query()
the_feed_link()
the_privacy_policy_link()
get_the_privacy_policy_link()
body_class()
next_image_link()
next_post_link()
next_posts_link()
post_class()
post_password_required()
posts_nav_link()
previous_image_link()
previous_post_link()
previous_posts_link()
single_post_title()
the_category()
the_category_rss()
the_content()
the_excerpt()
the_excerpt_rss()
the_ID()
the_meta()
the_tags()
the_title()
get_the_title()
the_title_attribute()
the_title_rss()
wp_link_pages()
get_attachment_link()
wp_get_attachment_link()
the_attachment_link()
the_search_query()
is_attachment()
wp_attachment_is_image()
wp_get_attachment_image()
wp_get_attachment_image_src()
wp_get_attachment_metadata()
get_the_date()
single_month_title()
the_date()
the_date_xml()
the_modified_author()
the_modified_date()
the_modified_time()
the_time()
the_shortlink()
wp_get_shortlink()
has_post_thumbnail()
get_post_thumbnail_id()
the_post_thumbnail()
get_the_post_thumbnail()
echo get_parent_theme_file_uri( 'images/logo.png' );
//or
echo get_parent_theme_file_path( 'images/logo.png' );
wp_enqueue_style( $handle, $src, $deps, $ver, $media );

wp_enqueue_style( 'slider', get_template_directory_uri() . '/css/slider.css',false,'1.1','all');

wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer);

wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), 1.1, true);
// Check if menu exists
if ( $menu_items = wp_get_nav_menu_items( 'menu' ) ) {
   
   // Loop over menu items
   foreach ( $menu_items as $menu_item ) {

      // Compare menu object with current page menu object
      $current = ( $menu_item->object_id == get_queried_object_id() ) ? 'current' : '';
      
      // Print menu item
      echo '<li class="' . $current . '"><a href="' . $menu_item->url . '">' . $menu_item->title . '</a></li>';
   }
}

Similiar Collections

Python strftime reference pandas.Period.strftime python - Formatting Quarter time in pandas columns - Stack Overflow python - Pandas: Change day - Stack Overflow python - Check if multiple columns exist in a df - Stack Overflow Pandas DataFrame apply() - sending arguments examples python - How to filter a dataframe of dates by a particular month/day? - Stack Overflow python - replace a value in the entire pandas data frame - Stack Overflow python - Replacing blank values (white space) with NaN in pandas - Stack Overflow python - get list from pandas dataframe column - Stack Overflow python - How to drop rows of Pandas DataFrame whose value in a certain column is NaN - Stack Overflow python - How to drop rows of Pandas DataFrame whose value in a certain column is NaN - Stack Overflow python - How to lowercase a pandas dataframe string column if it has missing values? - Stack Overflow How to Convert Integers to Strings in Pandas DataFrame - Data to Fish How to Convert Integers to Strings in Pandas DataFrame - Data to Fish create a dictionary of two pandas Dataframe columns? - Stack Overflow python - ValueError: No axis named node2 for object type <class 'pandas.core.frame.DataFrame'> - Stack Overflow Python Pandas iterate over rows and access column names - Stack Overflow python - Creating dataframe from a dictionary where entries have different lengths - Stack Overflow python - Deleting DataFrame row in Pandas based on column value - Stack Overflow python - How to check if a column exists in Pandas - Stack Overflow python - Import pandas dataframe column as string not int - Stack Overflow python - What is the most efficient way to create a dictionary of two pandas Dataframe columns? - Stack Overflow Python Loop through Excel sheets, place into one df - Stack Overflow python - How do I get the row count of a Pandas DataFrame? - Stack Overflow python - How to save a new sheet in an existing excel file, using Pandas? - Stack Overflow Python Loop through Excel sheets, place into one df - Stack Overflow How do I select a subset of a DataFrame? — pandas 1.2.4 documentation python - Delete column from pandas DataFrame - Stack Overflow python - Convert list of dictionaries to a pandas DataFrame - Stack Overflow