add_action(‘admin_head’, ‘my_custom_fonts’);
function my_custom_fonts() {
echo ‘<style> body, td, textarea, input, select {
font–family: “Lucida Grande”; font–size: 12px;
}
</style>‘;
}
add_action(‘admin_head’, ‘my_custom_fonts’);
function my_custom_fonts() {
echo ‘<style> body, td, textarea, input, select {
font–family: “Lucida Grande”; font–size: 12px;
}
</style>‘;
}
Please follow below steps
Now will successfully redirect to cart page after adding product to cart.
<?php
$values = get_field(‘pdf_values’);
if($values)
{
echo ‘PDFS’
foreach($values as $value)
{ ?>
<?php echo $value[pdf_url]; ?>
<?php echo $value[pdf_name]; ?>
<?php
}
}
?>
jQuery(document).ready(function(){
var heights = [];
var height1 = jQuery(“.block_div_1”).height();
heights.push(height1);
var height2 = jQuery(“.block_div_2”).height();
heights.push(height2);
var max = Math.max.apply(Math,heights);
jQuery(“.block_div_1”).css(“height”, max+”px”);
jQuery(“.block_div_2”).css(“height”, max+”px”);
});
To redirect to SSL please find below code and place in functions.php file.
function force_https() { if ( !is_ssl() ) { wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 ); exit(); } } add_action ( 'template_redirect', 'force_https', 1 );
“Dashicons” is the official icon font of the WordPress admin as of 3.8.
Please find below link to check dashboard icons to use and change.
Use below code to set icons for wordpress custom post types.
Use below code in functions.php
function wpdocs_create_post_type() {
register_post_type( ‘acme_product’,
array(
‘labels’ => array(
‘name’ => __( ‘Products’, ‘textdomain’ ),
‘singular_name’ => __( ‘Product’, ‘textdomain’ )
),
‘public’ => true,
‘has_archive’ => true,
‘menu_icon’ => ‘dashicons-products’, // Here change Icon
)
);
}
add_action( ‘init’, ‘wpdocs_create_post_type’ );
Yes some times WordPress will slow because of sessions
In some cases we have started session in functions.php and header.php.
When we place session_start() in header.php site will slow down at that time we need to use cookies like below
Set cookie
<?php setcookie(“CookieData”, $value, time() + (86400 * 30), “/”); ?>
Get cookie
<?php echo $_COOKIE[“CookieData”]; ?>
Set cookie
<?php setcookie(“TestCookie”, $value, time() + (86400 * 30), “/”); ?>
Get cookie
<?php echo $_COOKIE[“TestCookie”]; ?>
Set session value
<?php session_start();
$_SESSION[“TestSession”] = $value; ?>
Get session value
<?php echo $_SESSION[“TestSession”]; ?>
We need to update “web.config” in windows environment.