How to disable the_excerpt from one post

First of all, WordPress already includes a function for displaying excerpts: the_excerpt() Secondly, your second piece of code isn’t actually displaying anything. You need to use the echo statement for displaying text on the page. However, WordPress provides functions that actually display the content and excerpt on the page: the_content() and the_excerpt(), respectively. if( in_array( … Read more

How to create a second posts page which client can update

This is a perfect case for custom post types Simply create a post type called “specials” and you can use it just like your regular posts. EDIT: If you’re new to WordPress and aren’t interested in editing PHP, you can use a plugin like the Custom Post Type UI

get_posts from a category id doesn’t work

It’s ‘post_date’ not ‘date’ so $args = array( ‘numberposts’ => $items, ‘post_type’=>’portfolio’,’orderby’ => ‘post_date’,’order’=>’DESC’,’category’ => 5 ); $posts = get_posts($args); foreach($posts as $post){ setup_postdata($post); $return_html=”……”; } Should fix you up.

Why posts array is empty?

You don’t need to add the % signs to the value. WordPress does that for you automatically on a LIKE or NOT LIKE comparison. You also don’t need to “sanitize” the parameter, it will be automatically escaped for SQL. See wp-includes/meta.php, around line 806 or so.

Single Post in Tab/Slider

If you are using jQuery UI Tabs you can use AJAX to load the content. There is an example on the plugin page. UI Tabs is always part of a WordPress installation and registered already as jquery-ui-tabs.

Custom Post Type archive

When you’re viewing a Custom Post Type Archive, your archive-documents.php template will be used. In your case this is the URL /documents/. When you’re viewing a taxonomy term, you’re viewing a Custom Taxonomy Archive, not a Custom Post Type Archive. If you haven’t created one specific to your taxonomy, then archive.php (or index.php, if archive.php … Read more