Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bltavares/pgnator
Dinamic WpQueries paginated
https://github.com/bltavares/pgnator
Last synced: 28 days ago
JSON representation
Dinamic WpQueries paginated
- Host: GitHub
- URL: https://github.com/bltavares/pgnator
- Owner: bltavares
- Created: 2010-12-14T01:53:29.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-01-22T00:48:59.000Z (almost 14 years ago)
- Last Synced: 2024-04-14T19:36:16.197Z (7 months ago)
- Language: PHP
- Homepage: http://bltavares.github.com/PgNator/
- Size: 97.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
COMO UTILIZAR O PLUGIN
Depois de instalado, o PgNator de dá total liberdade de criar wpQueries
1. Crie um PgNator
$pgnator = new Pgnator();
ou
$pgnator = new Pgnator("caminho/completo/para/o/estilo.css")2. Gere suas queries utilizando o Pgnator
$posts = $pgnator->content("argumentos=normais&do=WPQUERY");
ou
$posts = $pgnator->content("SELECT * FROM wp_posts",true);3. Faça o loop normalmente
while($posts) {
$posts->the_post();
/// Estilize do seu jeito, como você faz normalmente
...
///
}4. Coloque o link para as páginas
echo $pgnator->createMenu();
5. Só isso
////
HOW TO USE THE PLUGIN
After installing, PgNator whill give you freedom with your WPqueries
1. Create a PgNator
$pgnator = new Pgnator();
ou
$pgnator = new Pgnator("path/to/your/own/style.css")2. Generate your queries using Pgnator
$posts = $pgnator->content("normal=arguments&like=WPQuerie");
ou
$posts = $pgnator->content("SELECT * FROM wp_posts",true);3. Create your loop
while($posts) {
$posts->the_post();
/// Create your own code
...
///
}4. Generate page links
echo $pgnator->createMenu();
5. Done
Referencias / Reference
$pgnator->numPosts = 8; // Set the number of posts_per_page / Seleciona o numero de posts por paginador
$pgnator->cleanURL = true; //Set clean urls / Selecion urls limpas
$pgnator->content($query, $sql = false) // Generate a wpqueri object / Gera um objeto WPQuerie
$pgnator->createMenu() // Return a menu string / Retorna uma string do menu
$pgnator->rename($previous,$next) // Renames the next and previous links / Renomeia os links de próximo e anterior
$pgnator->changeRange($int) // Change the range of numbers / Muda a faixa de numeros