display custom fields from custom post type

in order to display custom fields from custom post type when you don’t know the custom field name first use

<?php the_meta(); ?>

to dump out all custom fields as a list

then u can see the filed name and copy it

then u use it with this

<?php echo get_post_meta($post->ID, ‘custom_field_name’, true); ?>

just replace custom_field_name with the field name

happy day


opencart Forbidden You don’t have permission to access

many times for some reason when u press save in opencart admin panel u get this


You don’t have permission to access /admin/index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


and start digging around and most of the times it is the same solution which i keep forgetting it is server issue and the answer is :

Mod_security is blocking this operation


so u need to talk to the hosting support to fix this and all will be alright



Show only not active languages in language selector

Please add the following code to your theme’s functions.php file, just before php end tag

function new_nav_menu_items($items,$args) {
if (function_exists(‘icl_get_languages’)) {
$languages = icl_get_languages(‘skip_missing=0’);
if(1 < count($languages)){
foreach($languages as $l){
$items = $items.'<li class=”menu-item”><a href=”‘.$l[‘url’].'”>’.$l[‘native_name’].'</a></li>’;
return $items;
add_filter( ‘wp_nav_menu_items’, ‘new_nav_menu_items’,10,2 );