Articles Tagged 'POST'


WordPress shortcode Table

Let me demonstrate how to use the shortcode - indented (nested) - WordPress to create tables to insert into posts and pages. For example, I will show you how to create comparative charts, those used to compare the particularities of applications or products, such as:

Continued ...

Very short snippet: NSConnection POST with parameters

che in modalità POST . The object NSMutableURLRequest can be used in either GET mode in POST . . The parameters, however, must be formatted as if they were in GET , ie in the sequence nome_campo1=valore1&nome_campo2=valore2&... . Here's a useful snippet to simplify the construction of fields:

Continued ...

Very short snippet: get the number of posts, Page and Attachment

How many of you know, the table wp_posts is used to store the WordPress post, pages and attachments. The type of the item stored is determined by the field post_type . . With select proposed below, you can "count" individually the various types of elements in memrizzate wp_posts .

Continued ...

WordPress: Remove duplicate posts in multiple loops

(che poi sono fondamentalmente la stessa cosa) di WordPress permette di ottenere una lista di post impostando numerosi parametri di ricerca (vedi Very short snippet: visualizzare una lista di post per categoria o tag ). The useful feature query_posts() or object WP_Query (which are basically the same thing) WordPress allows you to get a list of many post-setting search parameters (see Very short snippet: Display a list of posts by category or tags ). Precisely because of its versatility in search of post may happen that the function using two or more times in a row you get the "duplicate".

Continued ...

Very short snippet: Wordpress, soon on your blog

WordPress, like most of you know, allows you to publish a post "post-dated" (good pun). In practice, the post is stored with a date that is yet to come. This allows many bloggers to "schedule" (program) to publish the post without worrying about being in your console to the publication itself. It also allows you to maintain a constant after the publication of even when we are on vacation.

Continued ...

Very short snippet: Display a list of posts by category or tags

Two useful features, customizable at will, to be used to show the last n posts of a category or one or more tags. Functions, as you will see, are very similar and are both based on a loop generated by query_post() . The first, show_title_cat() , shows the last post (in this version only the title) of a specific category:

Continued ...

Wordpress: order a series of posts for any field

o un array di oggetti. The technique that I describe here is useful in many situations where, for example, we have an array of array or array of objects. , senza aver accesso alla select originale (sul database) che ha generato l'elenco (array) stesso: In WordPress you may want to manipulate a list of posts, in the standard format array of stdClass Object without having access to select the original (the database) that generated the list (array) itself:

Continued ...

Very short snippet: how to retrieve the parent category in Wordpress

In WordPress categories can be arranged in a structure "father" "son". This means that a single post can belong to multiple categories. It may be useful in some cases determine, regardless of the "children", which is the parent category of a post:

Continued ...

Very short trick: pages and pages parents daughters to WordPress

Alternately to the post in WordPress pages that are available, although similar, have some important differences with the "Post" (articles) real. In praticolare a page can have sub pages ("children"), similar to what happens with the categories. Here are some useful scripts to extricate their management and handling:

Continued ...

Very short snippet: PHP isset_post ()

Often having to check if a variable has been sent with the POST, and if not, assign a default value. Instead of using the syntax:

1
isset ( $_POST [ 'var_post' ] ) ? $_POST [ 'var_post' ] : default ; $ Miavar = isset ($ _POST ['var_post'])? $ _POST ['var_post']: default;

Continued ...