Articles Tagged 'Theme'

How to set automatic thumbnails of all post

The new feature of the thumbnails in WordPress, which was introduced with version 2.9 and discussed in WordPress 2.9 +: new function, post thumbnails , can be automated through a simple script in PHP. This can be handy when "you forgot" to include thumbnails of each item or if you want to update the previous.

Continued ...

WordPress 2.9 +: new feature post thumbnails

With the latest release of WordPress 9.2 + from, we have introduced a new feature very useful to manage the thumbnails, or thumbnails. This feature, however, must be turned in the theme, namely, acting on the file functions.php . This new feature is useful in many contexts and provides a simple and convenient tool for both the developer of a website using WordPress is the final customer who will then manage the content.
In versions of WordPress prior to 2.9, in fact, many developers used the custom fields (custom fields) to provide customers the ability to add an image - external - to the post. Solution from the point of view that if the developer was not particularly burdensome, RENDEV still editing the post quite inconvenient, especially if we consider that very often is the end customer to treat the contents.

Continued ...

Browser or mobile browser?

Our website is now only displayed by PCs. With the spread of mobile, thanks to Apple's iPhone, to access the site or blog is increasingly being performed by a variety of mobile devices. It is therefore need to know how many Web Developer intercept and identify the different "agents", ie the means by which a user is viewing (browsing) our pages.

Continued ...

A WordPress theme for all

Under the heading of the blog, on the left, just above the navigation bar, there is a "switch" that allows you to switch to an alternate graphic theme, namely "clear".

The graphic theme of a blog is chosen by the blog owner himself, or if it is created by hand, whether it was downloaded from the network. The end result, however, in addition to "us" owners should be pleased by our visitors who do not always appreciate certain layout choices. For some it will be trivial for other wonderful, for others still terribly annoying! So why not to choose the "visitor" to display the layout with our blog?

Continued ...

WordPress: Write a personal log

Starting from the post WordPress: step by step how to create their own login , performed the login procedure could be useful to indicate in our Blog Link to disconnect or log out. We will not use again the standard procedures of WordPress, but as we will see log out at a low level. First we must determine whether a user is logged in or not. This is possible simply by querying the variable $user_ID WordPress. For example:

1
2
3
$user_ID != '' ) { // oppure if( is_user_logged_in() ) { if ($ user_id! ='') {/ / or if (is_user_logged_in ()) {
/ / A user is "logged in" ...
}

Once we know that a user is "logged" into the system, we can insert a simple link to our logout page. Then create a page, for example, logout.php , and inserting the following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/ **
* Performs logout
*
* @ Author Giovambattista Fazioli
* @ @ Email g.fazioli undolog.com
* @ Web http://www.undolog.com
* /
/ / Invoke bootstrap WordPress
( 'wp-config.php' ) ; @ Require_once ('wp-config.php');
( 'wp-includes/pluggable.php' ) ; @ Require_once ('wp-includes/pluggable.php');
/ / Wp logout
wp_logout ();
/ / Load any other page
"Location: /" ) ; header ("Location: /");

And just then "link" our procedures to provide a logout:

1
2
3
$user_ID != '' ) { if ($ user_id! ='') {
; echo 'Run <a href="logout.php"> logout </ a>';
}

Continued ...

WordPress: how to write a reply to comment using jQuery

Recently Cristiano Up has released a useful plugin for WordPress that can Append two links to each comment in a post (maybe you have installed a similar, since in the directory WordPress.org I beamed a couple, but being an Italian software would the case to honor the excellent work done by Christian). These links (reply & shares), meet and / or to quote the author of a comment by performing the tedious task to insert the at sign (@) to indicate to whom it is addressed. In this tutorial I will show - for medium to experienced users - the way these two features adding to it "by hand", without resorting to the installation of any plugins. Also exploit the capabilities of jQuery for the JavaScript part. The technique I present is the same that I used to introduce this feature in this blog.

Note: The use of a plugin is the best solution for those who tend to frequently modify your WordPress template, or at least, has plans to implement this. This tutorial is only to show how to perform targeted interventions within the code WordPress and is dedicated to the inquisitive.

Edit the file comments.php

The first change we make is to insert the link "reply" and "shares" in every comment. To do this we edit the file comments.php located in the folder of our theme. This file contains all the instructions that display the comments at the end of a post. The section we are concerned (which may vary slightly from theme to theme) is the creation of loops through the comments, identified by:

Continued ...