Language code added as ID.
<body id="lang-<?php echo ICL_LANGUAGE_CODE; ?>">
Ouput:
<body id="lang-en">
Resource: https://wpml.org/forums/topic/how-to-add-class-to-body-tag-language/
Language code added as ID.
<body id="lang-<?php echo ICL_LANGUAGE_CODE; ?>">
Ouput:
<body id="lang-en">
Resource: https://wpml.org/forums/topic/how-to-add-class-to-body-tag-language/
Put in functions.php
https://wordpress.org/support/topic/adding-tags-with-commas-in-them
// filter for tags with comma // replace '--' with ', ' in the output - allow tags with comma this way // e.g. save tag as "Fox--Peter" but display thx 2 filters like "Fox, Peter" if(!is_admin()){ // make sure the filters are only called in the frontend function comma_tag_filter($tag_arr){ $tag_arr_new = $tag_arr; if($tag_arr->taxonomy == 'post_tag' && strpos($tag_arr->name, '--')){ $tag_arr_new->name = str_replace('--',', ',$tag_arr->name); } return $tag_arr_new; } add_filter('get_post_tag', 'comma_tag_filter'); function comma_tags_filter($tags_arr){ $tags_arr_new = array(); foreach($tags_arr as $tag_arr){ $tags_arr_new[] = comma_tag_filter($tag_arr); } return $tags_arr_new; } add_filter('get_terms', 'comma_tags_filter'); add_filter('get_the_terms', 'comma_tags_filter'); }
Add it to functions.php
/** * Remove a top level admin menu in Dashboard * * http://codex.wordpress.org/Function_Reference/remove_menu_page */ function remove_menus(){ remove_menu_page( 'edit.php' ); //Posts remove_menu_page( 'edit-comments.php' ); //Comments remove_menu_page( 'tools.php' ); //Tools } add_action( 'admin_menu', 'remove_menus' );
Add it to functions.php
add_action('woocommerce_single_product_summary', 'jvo_product_data', 22 ); function jvo_product_data() { echo "<div class='jvo-product-data'>"; echo types_render_field("jvo-product-data", array("output"=>"HTML")); echo "</div>"; }
How to remove left menu items in Dashboard.
For removing submenu item: http://codex.wordpress.org/Function_Reference/remove_submenu_page
Below removes Posts, Comments, and Tools.
/** * Remove a top level admin menu in Dashboard * * http://codex.wordpress.org/Function_Reference/remove_menu_page */ function remove_menus(){ remove_menu_page( 'edit.php' ); //Posts remove_menu_page( 'edit-comments.php' ); //Comments remove_menu_page( 'tools.php' ); //Tools } add_action( 'admin_menu', 'remove_menus' );
http://codex.wordpress.org/Function_Reference/remove_menu_page
As a plugin: http://premium.wpmudev.org/blog/how-to-remove-menus-from-the-wordpress-dashboard/
If custom field type is empty or has a value.
If “varighed” has a value, display. Otherwise don’t. Code snippet #1
<?php if(types_render_field('varighed', array('raw'=>'true'))){?> <?php echo '<p class="freelance-jobmeta-type">Varighed:</p><p class="freelance-jobmeta-data">'.types_render_field("varighed", array("output"=>"HTML")); ?></p> <?php }?>
Code snippet #2
<?php if(types_render_field('fw_product_wine_appellation', array('raw'=>'true'))){?> <dt class="productLabel"><?php echo __( 'Appellation:', 'formulawino' ); ?></dt><dd class="productDescription"><?php echo(types_render_field('fw_product_wine_appellation', array('class'=>''))); ?></dd> <?php }?>
If value display
<?php if(types_render_field('methods-tools-download-box-form', array('raw'=>'true'))){?> <div class="methodsToolsFree"><?php echo "Free download included"; ?></div><?php }?>
Only display HTML if custom field type excist.
<?php echo "<p>".types_render_field("jvo-testimonial-post-service-type", array("output"=>"HTML")); echo "</p>" ?>
Sortere efter titel.
<?php if(have_posts()): query_posts('post_type=testimonials&orderby=title&order=ASC&posts_per_page=-1'); while(have_posts()): the_post(); ?>
Reference: https://codex.wordpress.org/Class_Reference/WP_Query
.parent-element { -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; transform-style: preserve-3d; } .element { position: relative; top: 50%; transform: translateY(-50%); }
Reference: http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/
Delete “WinFileCache-********.dat” in C:\Users\(username)\AppData\Roaming\Adobe\Dreamweaver CS5.5\en_US\Configuration.
If that does not work delete/rename “Configuration” folder.