How To Create “Dynamics Statics” Pages


Sponsored Links






There are so many WordPress Tricks that we can apply. In our current section we will show you, how to create “Dynamics” “Statics” Pages in WordPress. That’s I mean on this point is simple. We will generated semi automatics pages using little bit query and custom field

Creating dynamic static  pages - Jessica Jane Clement

Creating dynamic static pages - Jessica Jane Clement

The first time we should to do is create Custom Page, it’s really simple, duplicate your page.php and give another name (example page-dynamics.php) and added on the top code

<?php /* Page Template: Dynamics Page */ ?>

That’s all, so simple right? The next step is added Custom Loop like on this example

<?php
$customQuery = new WP_Query();
$customQuery->query('meta_key=this-is-page');
?>
<?php while ($customQuery->have_posts()) : $customQuery->the_post(); ?>
<!– Do query stuff here –>
<?php endwhile; ?>

On our current example, on each post that we want play as page, we only need to added custom field this-is-page. If you need real example for this tricks you check it on WP Shout.

Maybe you interested to enhanced your WordPress as CMS on our previous post

Photos Jessica Jane Clement courtesy Egotastic

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

Create Custom Page with Custom Loop and Query

Created WordPress as CMS? I am guarantee you’ll need this tricks. Because WordPress Custom Page is Gregorius tools we can use to create custom design/layout and whatever we want. I will show you how to Create Custom Page with Custom … Read More

Automatically Create a Custom Field

WP Canyon did wonderful tricks, this tricks is about how to automatically create a custom field when a post is published. This wonderful method is added some code on your functions.php files on your current theme. The first time need … Read More

How to Display a Dynamics Date Copyright

Have you ever seen, some time website has Copyright on the footer? Example on WordPress Tricks Copyright © 2010 - WordPress Tricks & Tips is proudly powered by WordPress, On this tutorial I will show you How to Create and … Read More

How To Exclude Pages or Posts from Search Results Page

For some reason, sometimes we need to exclude some contents on our WordPress site from search results in our WordPress. Example we didn't need to display our about page to be indexed or searchable by WordPress search. To enable this … Read More

Create Post Pagination without Plugin

We are already now, there are wonderful plugin to create Post Pagination on WordPress that call WP Pagenavi. But today I will share it how to create Post Pagination without plugin without any plugin installed. This method only using litle … Read More

The Best Way to Get All WordPress Custom Fields

WordPress Custom Fields is the most usable field ever, we can give many information using custom fields, we can added custom image post, added some content and many many things we can do. Sometime we need to Get all wordpress … Read More


5 Responses to How To Create “Dynamics Statics” Pages

  1. Dan says:

    Hello, I’m days old with WordPress and I;’m also using Thesis. How would I make a page with a custom database query? I’ve read your post but I’m unable to understand how to start the page. Do I use the page editor in the dashboard or make a new file on the server?

    • Luke says:

      Dan,

      If you are wanting to create an additional CUSTOM page into WordPress you need to do this on your server via FTP and a text editor NOT the WordPress editor.

    • You would make a unique file. You can do some research on WP_Query and it will help you a lot. WP_Query accepts dozens of helpful parameters in the form of a request string or an array to grab the information you need.

  2. the pictures you put in your post are soo hot

  3. SQL training says:

    Your website is a good source of tricky codes in word press.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>