Nella Sezione: Blog

9 Elementi

Gallery Metabox – Add to your Theme in Development

https://github.com/zulfnore/gallery-metabox
Usage

This is not a plugin! You need to include this in your theme folder and further customize it to your needs. If you are not comfortable doing this, don’t use it…

Include the gallery.php in your functions.php:

require_once ‘gallery-metabox/gallery.php’;

Specify where you want the gallery metabox to show on line 17 in gallery.php. You can pass an array to have it show up on multiple post types, custom post types are also allowed:

$types = array(‘post’, ‘page’, ‘custom-post-type’);

In your template inside a loop, grab the IDs of all the images with the following:

$images = get_post_meta($post->ID, ‘vdw_gallery_id’, true);

Then you can loop through the IDs and call wp_get_attachment_link or wp_get_attachment_image to display the images with or without a link respectively:

foreach ($images as $image) {
echo wp_get_attachment_link($image, ‘large’);
// echo wp_get_attachment_image($image, ‘large’);
}

WordPress: Aggiungere una Classe CSS automaticamente alle immagini

WordPress: Aggiungere una Classe CSS automaticamente alle immagini

Adding class to WordPress linked images

An enduring issue with linked images, is targeting the anchor link for theming—especially for disabling borders and highlighting that look great on text links but odd for images. CSS doesn’t have a parent selector ( a > img:parent), and javascript feels like overkill. The simple solution is to add a class to the parent anchor (), but that can get repetitive, especially when WordPress is supposed to automate those sorts of things. {leggi tutto}

Aggiungere Widget nella Dashboard di WordPress

Aggiungere un Widget Personalizzato alla Dashboard di WordPress:
Questo codice è stato recuperato da un tema acquistato qualche giorno fa… credo sia utile a tutti vedere quanto sia semplice personalizzare la dashboard con un widget che brandizzi il vostro tema!

Il codice qui riportato va naturalmente inserito all’interno del file FUNCTION.PHP

/* DASHBOARD WIDGET */
function my_custom_dashboard_widgets_tp() {
	global $wp_meta_boxes;	
	add_meta_box( 'custom_help_widget', 'Benvenuto!', 'custom_dashboard_help', 'dashboard', 'normal', 'high' );	
}

function custom_dashboard_help() {	
	echo '<p id="themeprince"><a href="http://www.locombi.com/" target="_blank"><img src="'.get_bloginfo('template_url').'/images/locombi.jpg" style="float: left; margin-right: 15px;" /></a>
		<span class="themeprince_h4">Grazie per aver Scelto Locombi.com!</span><br /><br />
		We appriciate that you decided to use one of our themes. Please read the included documentation carefully and in case something is not working properly, use
		our <a href="http://www.locombi.com/forum">Forum di Supporto</a> to receive help. All reported bugs will be fixed and updated.		
		Don\'t forget to <a href="http://www.locombi.com/" target="_blank">Visita il Nostro Sito</a> e rimani aggiornato sui nuovi temi!
		<br /><br />
		Buona Giornata!<br />
		<a href="http://www.locombi.com/" target="_blank">Locombi.com - Web Agency & Studio Grafico</a><br /><br />
	</p>';	
}
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets_tp');

Invitare tutti gli amici di Facebook a mettere mi Piace

Come Selezionare tutti i tuoi amici per chiedere di mettere MI PIACE alla tua PAGINA FACEBOOK.
REQUISITO BASE: MOZILLA FIREFOX!
{leggi tutto}

open