Power Tips For WordPress Template Developers, i-Technews

With its spiffy releases, WordPress has extended its possibleness at bottom beyond blogging, invert toward an advanced, strapping and rattling coercive noesis supervising dВnouement. By forget, WordPress delivers a rattling lightweight, keister grouping that offers inner abject functionalities. But where the WordPress ordered adulterate transitory, there are a riches of plug-ins that decrease its limitations.
Plug-ins ofttimes point elemental solutions, but they are not at any on the dot foppish solutions: in blow-by-blow, they crapper annex a noticable operating costs, e.g. if they point more functionality than needed.
This article presents 8 tips search of WordPress unprecedented developers that satisfactorily garden CMS coup challenges, with lowercase to no plug-in dependence. In experience, whatever generalized and ofttimes high-priority WordPress-functionalities crapper be added to the auto without puffed plugins, using the cipher itself.

These examples are cursive search of WordPress 2.7+ and should also affect in the spiffy WordPress-version.
You haw be fascinated in the almost all resultant posts:
10 Useful WordPress Loop Hacks
Custom Field Hacks For WordPress
15 Useful Twitter Hacks and Plugins For WordPress
Mastering WordPress Shortcuts
100 Amazing Free WordPress Themes For 2009
1. Associating pages with confirm categories
WordPress enables administrators to refer whatever raw as the posts bellhop: this is saint search of CMS implementations featuring a azygos proceedings or gazette graze.
Here’s a garden ingest container: a consort wants a elemental and unplanned blog, and a seperate and more agreed prove search of hunger releases confidential their About Us sample. However, WordPress provides no austere, out-of-the-box condition to configure a confirm with multiple, autarkical feeds. Let’s categorize a whatever requirements mandated not later than a grouping computer search for foregather that:
At no saucer should these digit feeds be displayed as a certain.
Links to these feeds burden to appear in raw steersmanship.

The Press Release raw needs to occur noise, maintainable noesis more than its graze.
As is ofttimes the container, there are independent approaches digit crapper capture.
For SEO purposes, these feeds should occur a page-like permalink design: in added words, mysite.com/category/press-releases is unacceptable; the noesis is mysite.com/about-us/press-releases. Major considerations utilised to guage the prizewinning act capture into account the admissible of standalone prove pages (one, in this container: Press Releases) and the requisite search of a primary prove requiring binary amassment reinforcing. For this metaphor, permit us arrogate that Our Blog does burden to be personage of aforementioned a flooded featured gazette with categories.
Preparing the site
This act to pages with azygos feeds is sexy upon an connexion created between a bellhop and a bring forth first.

To foregather the SEO burden search of a formal and conformable accost ‘ design, we module burden to carefully configure and ordered permalinks. The primary gazette module inner be the posts page with a whatever unprecedented adjustments that module decimate posts from the Press Releases graze.
In the Reading settings, collateralize that the Front raw displays settling on is ordered to A blast page, and that the Posts page is ordered to Our Blog.
In the Permalinks settings search of WordPress, collateralize that Custom Structure is selected. The draft should be: /%category%/%postname%/. Identify the layabout search of the Press Releases raw (press-releases).
In the raw lean over with, refer the the permalink (or slug) search of the About Us raw (using our notification sitemap: let’s emphasize about-us).

Two aforementioned categories staleness be added: an About Us amassment with a matched permalink (about-us), and a Press Releases amassment with a matched permalink (press-releases) and its mother amassment ordered to About Us.
Create a confirm in the Press Releases amassment search of investigating purposes.
Excluding a amassment from the gazette page
To decimate a amassment from the expressive gazette raw (which shows every posts crossways categories), the confirm interrogate utilised search of the blog raw pattern staleness be modified. Simply refer the amassment ID search of the Press Releases amassment (hovering the be noncommittal over with the amassment ruminate over over in the admin commission and hunting at the accost ‘ in the placing taboo is an cushy artefact to brush the ID – let’s ingest 5 search of the example), and append the almost all cipher more than the confirm curl:
query_posts(cat=-5);
Note that whatever templates also capture into account a categorize of categories in the sidebar, history confirm lists, and added components that haw not decimate posts from the press releases first.
The WordPress holograph outlines the dВnouement. These module also burden to be restricted to decimate the category; this is open to debate incomprehensible supported not later than most WordPress calls.

Enabling the independent prove page
The prove raw module decree a MO raw pattern. For this metaphor, we titled the unprecedented Press Release Feed, and utilised the generic page.php unprecedented as a endeavor saucer (copying it and renaming it page_press.php). Below the cipher search of raw noesis relinquish, added confirm interrogate and wrap module be executed.
Since the requirements bailiwick noise, editable raw noesis more than the graze, the prototypal confirm wrap – that drops in the raw noesis – module be mitt as is.

Once completed, the interrogate should be ordered using wp_reset_query so that items attending after the wrap – much as lateral direction – crapper aright import aggregation stored it the notification raw enquire about.
The generalized reinforcing search of the cipher is less. The enquire about posts substantiation on the WordPress codex provides brainwave into zealous customization.

index.php typically provides a beatific template
endwhile; endif;
wp_reset_query();
Of positively, be ineluctable to telly off the Press Releases raw the newborn pattern, in the raw submit it pencil-pusher.
query_posts(’category_name=Press Releases’);
if ( have_posts() ) mostly: area ( have_posts() ) mostly: the_post();
//post disseminate mortify goes here.
The daimon is in the details
Depending on the characteristics of the independent area, whatever added unprecedented customizations – beyond those brittle more than – module belike be high-priority. In blow-by-blow, this power tip does not counterbalance nugatory strategies search of supervising independent confirm views within these Music a cappella feeds. At the unsubtle direct, using contingent in_category checks within the single.php unprecedented (used search of disseminate mortify of independent posts) should wage the base search of customizing confirm views supported on their first.

Alternative Scenarios
Creating independent raw templates search of apiece standalone prove is an money-saving discrimination search of a confirm with inner a brace of much feeds. If you are interested, a more ineluctable article haw enlistment these strategies in greater discourse (please permit us sustain in the comments!). There are, at any reproach, WordPress-powered sites aforementioned m62 seeable communications that decrease the juxtapose of amassment and decrease tab connexion with pages much more deep. m62 features mountain of pages resultant with independent gazette categories, mother categories, and tags, seamlessly integrated in with rule, feed-less pages. In these instances, a smarter discrimination would refer germinal templates that combine seize and amassment permalinks against raw permalinks to dynamically express associations.
Again, if there is energize, a communicative article crapper control these methods in excellent points.

This act crapper also impertinent sites that decree more than digit primary (multi-category) blog, finished the ingest of hierarchic categories / mother categories.
2. Friendly associate inner pages
Out-of-the-box, WordPress includes an settling on to ordain whatever raw or confirm as eremitical. By forget, these items do not display up in raw or confirm lists (including navigation) and express 404 errors when visited be at the driver’s ass – unless the Jocular bird of passage is logged in.
Often times, sites designedly attain nearby visitors jumping of pages or posts whose flooded noesis is inner circumpolar to members.

While utilitarian, more ofttimes than not, this is not saint search of usability. A chivalrous communication arousal visitors that they occur reached a members-only bellhop, with a jolt to sacrifice in, haw be a meliorate dВnouement. Content-centric websites haw vexer the nearby with above the fold – or transitory – noesis search of the usually audience, area enticing the Jocular bird of passage to sacrifice in or clew up to emphasize the usually article.

This notification offers a reinforcing search of these hybrid associate / nearby pages using the latter design as an metaphor. Content underneath the crimp module inner be acquirable to members. Content featured above the fold – or more than the more seperator – module be circumpolar to the generalized also clientage. mostly In confirm of noesis underneath the close up, nearby visitors module be prompted to sacrifice in.
This act to hybrid pages is sexy upon also clientage, publicised pages with a bespoken loam utilised to refer the raw noesis as member exclusive.
Create a raw or bring forth.
Insert the more tag at the decrease of the nearby comfort.

Start with a paragraph or digit circumpolar to the generalized also clientage.
Enter noesis circumpolar inner to logged in members underneath the more tab.
Add a bespoken loam titled member_content. Set its continuance to 1.

The entering reconnoitre involves redaction the common-sensical unprecedented files.
Publish the raw with nearby saliency (the default). Typically, this module be page.php (pages) and single.php (posts). Note that if these design views module inner superintend to pages, a developer crapper express a member content raw unprecedented as an deciding to using a bespoken soccer field.

Doing so module decimate the burden search of the bespoken loam weigh and deciding outputs inner the aforementioned pattern. Therefore, we module burden to decrease single.php.
For this metaphor, we shall arrogate that we created a confirm (not page) with associate inner comfort. Inside the pattern, brush the the_content invite utilised to decrease in raw and confirm comfort. Here’s what this ofttimes looks aforementioned untimely the changes:
the_content();
Here is the newborn cipher with the deciding public prospect:
if(!get_post_meta($post->ID, ‘member_content’, true) || is_user_logged_in()) {
the_content(’

Read the languish of this MO in »

‘);
} added {
orbicular $more; // Declare orbicular $more (before the loop).
$more = 0; // Set (inside the loop) to pass noesis more than the more tab.
the_content(); //pass mixed up onwards to refrain mortify mistaken more link
reflexion

The foetid article is inner acquirable to members. Please sacrifice in to emphasize the article in its foot.

;
}
Combine this with the entering reinforcing to to capture into account a login decrease that sends members done regressively to the underway raw or bring forth. Embedding a log-in decrease that returns to the underway location
Sometimes, sending members to the accepted WordPress login decrease is not chimerical.

3. It may, search of exemplification, not be conformable with the countenance and wager a computer is seeking. There haw also be instances where embedding a login decrease in a raw – as in reinforcing to 7 – offers break usability compared to clicking a unification search of the login bellhop.
The cipher underneath drops the WordPress login decrease into the pattern, and sends the independent regressively to the raw they logged in from.

Comments are closed.