cleaned up syntax errors:
<?php function titoloslide() {
query_posts(array(
'orderby' => 'rand',
'category_name' => 'testimonianze',
'posts_per_page' => 1
));
if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="testimonianzefurgonihome"><a href="#" title="Testimonianze noleggio furgoni KobalRent"><?php the_excerpt(); ?></a></div>
<?php endwhile; endif; wp_reset_query();
}
?>
Related Posts:
- How to limit the number of results for all query_posts on mysite
- How to change the case of all post titles to “Title Case”
- Dynamically add id to heading tags
- Restrict users from editing post based on the age of the post
- How to Display Post View Count
- $post object is null
- Hiding posts in a list from specified categories
- Why WP_Query(‘showposts=5’) shows only 1 post?
- Order posts alphabetically: how to set order=asc in mysql query?
- Get post meta retrieving wrong value
- Adding a user’s ID behind the tag ref link address
- How to only publish posts with image in it
- How to check in functions.php if there is data in a WP_Query?
- Get post by tag
- Query function not executed between element [closed]
- How to correctly escape data
- User driven content problems
- How can I create a menu items from meta box based on users input
- List direct children of page
- How *not* to show the last post on the latest posts list
- Display a custom field rating system in the front end
- wp trim function not working
- How to modify this function to exclude also the post belonging to a specific category?
- Improving WP_Query for performance when random posts are ordered
- How to rename “Publish” metabox title in post screen
- Accessing post->ID outside of the loop for listing child pages
- Create dropdown list post
- I would like to give special promotion for the first 100 posts in my blog? Can anyone tell me how to do that?
- how to set beforsend option in wordpress ajax methods
- Action hook for new pending posts?
- previewing my posts on static page?
- Exclude newest post from category X but show rest
- Uppercase first sentence in every post
- Add icon/badge next to posttitle of specific category
- Query all posts of a custom taxonomy term
- Ajax posts filter by date, comments, top views, top likes
- Reset Popular post query?
- Prepend or add an Image to the content of a Post
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- Why content_arr[‘extended’] removes paragraph tags?
- Displaying the last post on static homepage
- Inserting custom data to the_post() during loop
- Display post category in foreach loop with category link
- How To Get Posts With A Specific Word
- WordPress Custom Fields (Checkboxes with multiple values)
- Load post attached images on a single page site with fancybox
- is there a way to show the the post title after the image?
- Logged in user ID as post ID
- Most liked page not displaying posts
- Display posts with tag that matches current post title
- Why is querying posts messing up my pages?
- Display all posts that were published before full post on single.php
- How to make number of blog posts a custom field?
- Category Foreach keeps looping?
- Exclude category from
- Get post id in a function when edit/add a post
- Setting posts_per_page for taxonomy term template
- Blog post per page setting conflicting with custom WP_Query?
- Change post order random through out the entire WordPress
- How to exclude latest x posts from a paginated query?
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- How to display the link (title) and thumbnail post?
- Force the “Choose from the most used tags” meta box section to always be expanded
- Show the content that is after the excerpt using child theme
- How to allow users to post only in certain category and hide elements from edit page?
- How to do set post permalinks using 6 digit random unique function?
- Can’t get buddypress notifications in front-end; why do I get this error?
- How do I display some posts fully on the homepage, and some as an excerpt only?
- Random ajax load only works with posts_per_page set to -1
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Send post id through ajax and get the post content back
- Display an author’s posts on his own author page
- Creating a post from data returned from HTML form
- Multi row post list
- Display post x of y within category
- Force authors to Preview a post before publishing
- WordPress Automatic Filename Changer
- posts_per_page option limits the number of Gallery items
- List authors with the last post title and order by last post date
- How to make multiple sections in home pulling posts category wise?
- wp_posts table: safely remove unused columns to save database storage
- Query Posts by Custom Field
- Redirect to another page using contact form 7? [closed]
- Display post category in foreach loop
- How to order posts in an arbitrary order?
- Which PHP page is the Default Posts Page
- Display Posts on Custom Page
- How to get posts from a current post’s month?
- Wrong post title displayed from loop
- Nested WP_Query breaking loop
- WordPress query_posts by tag doesn’t work anymore(?)
- While loop articles – if statement order
- do more action after I publish a post
- Retrieve only posts from a specific user in wp-admin/edit.php
- Page template is accessing the incorrect posts?
- Conditionals if tags exist?
- How to list posts from a plugin taxonomy?
- Counting Search results, and displaying the offset per page
- Change all author links in Blog roll