Archive
wordpress
Put it inside the title field inside the widget
[:it]Prossimo evento[:en]Next Event
Read More

<? if (get_post_meta($post->ID, ‘videurl’, true)) { ?>
<?php $video_url=”videurl”;?>
<?php echo get_post_meta($post->ID, $video_url, true);?>
<? } ?>

Read More
add_action('do_meta_boxes', 'supercore_remove_thumbnail_box');
function supercore_remove_thumbnail_box() {
remove_meta_box( 'postimagediv','post','side' );
}

‘post’ can be: post, page or a post-type

Read More

iPhorm – Building forms in WordPress just got easy.

Read More
IN FUNCTION.PHP
function new_widgets_init() {
register_sidebar( array(
‘name’ => ‘Widget Area One’,
‘id’ => ‘widget-area-one’,
‘description’ => __( ‘Here the Widget Area One’),
‘before_widget’ => ‘<li id=”%1$s” class=”widget-container %2$s”>’,
‘after_widget’ => “</li>”,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
) );
register_sidebar( array(
‘name’ => ‘Widget Area Two’,
‘id’ => ‘widget-area-two’,
‘description’ => __( ‘Here the Widget Area Two’),
‘before_widget’ => ‘<li id=”%1$s” class=”widget-container %2$s”>’,
‘after_widget’ => “</li>”,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
) );
}
// Add the widget areas
add_action( ‘init’, ‘new_widgets_init’ );
WHERE YOU WANTS TO DISPLAY WIDGET<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Widget Area One’) ) : ?><?php endif; ?>
<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Widget Area Two’) ) : ?><?php endif; ?>
viaWondercore design — Multiple Widget Areas.
Read More

Add this in function.php

if ( !current_user_can( ‘edit_users’ ) ) {  add_action( ‘init’, create_function( ‘$a’, “remove_action( ‘init’, ‘wp_version_check’ );” ), 2 );  add_filter( ‘pre_option_update_core’, create_function( ‘$a’, “return null;” ) ); }

viaWondercore design — Remove the alert box “upgrade wordpress to version…”.

Read More

Reusable Custom Meta Boxes Part 1: Intro and Basic Fields | Wptuts+.

Read More
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Expo homepage')) : ?>
[ do default stuff if no widgets ]
<?php endif; ?>


Read More
If you have a form text field with default value / text like “Enter your Name: ”. As soon a visitor clicks on it to enter his Name the text should disappear. Is there a way to create this in wordpress if we use contactform7 plugin? Fortunately there is a way. Here is the steps:

1. add the below javascript to header.php

<script type=”text/javascript”>

function clearText(field)

{

if (field.defaultValue == field.value) field.value = ”;

}

function restoreText(field) {

if (field.value == ”) field.value = field.defaultValue;

}

</script>

2. In the contact form 7 plugin folder, edit file /modules/text.php.

Find line 76

$html = ‘<input type=”text” name=”‘ . $name . ‘” value=”‘ . esc_attr( $value ) . ‘”‘ . $atts . ‘ />’;

3. between ‘input’ and ‘type’, add:

onFocus=”clearText(this)” onBlur=”restoreText(this)”

4. You can add like the following to delete values automatically form textarea

Read More

A Simple but useful jquery function to swich between two different forms (contact form 7)

Written by Alessandro cristi for contact section of www.bayloncafe.com

 

<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js”></script>

<script>

$(“#info_btn”).click(function() {
switchForm(“info”);
});
$(“#arts_btn”).click(function() {
switchForm(“arts”);
});

function switchForm(form){

if (form == “info”) {
$(“#info_btn”).addClass(“active”)
$(“#arts_btn”).removeClass(“active”)
$(“#form_info”).css(“display” , “block”)
$(“#form_arts”).css(“display” , “none”)
}
else {
$(“#arts_btn”).addClass(“active”)
$(“#info_btn”).removeClass(“active”)
$(“#form_info”).css(“display” , “none”)
$(“#form_arts”).css(“display” , “block”)
}
}

</script>

Read More