Articles Tagged 'Loop'

Very short trick: WordPress, highlight the results of a search

There are many plugins for WordPress that allow to improve the characteristics and performance of the "Search". Almost all available Plugins have an attractive and useful feature highlight search terms in the search result. If you do not plan further appensantire your WordPress installation, but do not want to give up everything to a similar feature, here's how to easily implement a "highlights" of termites in the search results.

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: 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 ...