First of all, it works on my test install. I guess it depends on what you are searching for. I’m searching for ‘hello’ and the post ‘Hello World’ shows up fine.
Second, I get the following notice for this bit the_post_thumbnail( 'thumbnail', $attr );
:
PHP Notice: Undefined variable: attr
Third, just to be a perfectionist, I would put elseif
instead of if
right here:
<?php } if( get_post_type() == 'articulo' ) {?>
Related Posts:
- How to remove search bar from a wordpress theme? [closed]
- Get ‘page’ number with infinite scroll
- Get 10 posts from a WP_Query. If less than 10, get the remainder from elsewhere
- Why doesn’t /2013/01/ properly return January’s archives in archive.php?
- Strategy to get post meta for use outside the loop
- Grab the first paragraph of each post
- Single Page WordPress Theme – Using page templates
- A two column loop with one lead post
- Group search results by post type, but hide post types with no results
- Change loop order via form or link (jquery, not URL)
- First post of each category
- Is there any need to use both wp_reset_postdata and wp_reset_query together?
- query posts in wordpress
- Getting Permalink within the loop
- the_content() in single-{post-type}.php problem
- wp_enqueue_scripts not called on search page?
- Why does this loop only work on the homepage?
- Setting hero/splash section as a blog post
- posts_nav_link(); not showing up on static pages
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Finding Page Template and Displaying Content
- How can I customize wp_footer, where is the code that controls what this function does?
- How WordPress converts URL to $query_string
- Why is the first query affecting the second query, even after wp_reset_query() and wp_reset_postdata(), but not on the second page?
- Link won’t show using the_permalink();
- Some doubts about how to show posts in a custom theme?
- Force index.php have_posts() loop to exit if no sticky posts found
- Implement advanced search
- Why is the post type on the search result page random?
- Non-Blog Website without Search: are comments.php and search.php in theme still required?
- show a post from a specific post format
- paged > max_num_pages won’t throw 404
- Custom WordPress Theme – Search not working on posts
- Displaying recent post excerpts on static front page
- Limit Loop to 5 Posts?
- How to show user online status on their posts?
- Custom get_the_excerpt() only works on first post
- How to make search for posts using get method?
- WordPress Filtering Custom Post Type by Metadata and Search Heirachy
- Echo all category names, apart from one
- how to get the post attachement image in full size?
- Get the amount of posts on a given page
- Custom theme won’t use search.php
- Retrieve WordPress’ the_content() with jQuery
- Exclude subcategory from wp_query
- Style first 3 posts differently with WP_Query [duplicate]
- WP_Query not getting all posts, just tagged posts
- first excerpt fine, subsequent post excerpts shift to the right instead of displaying vertically [closed]
- Pagination and multiple loops
- Search Form Not Working
- altering search terms
- Search.php gets metadata from first post
- How can I sort my loop based on meta data, using a form?
- List categories of a post hierarchically?
- Exclude parent categories from the_category() within the loop
- Custom search template is showing 404 when adding query string
- get_the_terms() returning wrong results inside of loop
- Woocommerce AJAX filters option loading spiner – problem on mobile device
- Show only pages you are author of
- Why not works the search.php file?
- Add class every 4 post like , class_1, class_2, class_3, class_4 and class_1, class_2, class_3, class_4
- How do I make my terms for each product display via foreach loop? (woocommerce)
- WordPress Insert ads after every 5th post
- White screen of death on index.php page 3 and above?
- Is it possible to show sort page excerpt in search.php
- WordPress theme files Organization
- Infinite loop when nesting have_posts()
- Local variable name in setup_postdata()
- Loop is breaking my theme. How can I fix?
- my ajax wont sent the data, please correct my code
- control posts order by select option
- Problem with Displaying Custom Theme Page’s Content
- Why content is not adding for each blog post
- New theme HTML5 Support for Search in WordPress 4.4
- WordPress Custom Search By Alphabet and order by asc and sesc
- Best way to allow for extended use of WordPress functions inside single.php
- Incorrect search results in search.php – issue triggered by using `define(‘BodyID’, ‘search’); the_post();` in search.php
- Conditional loop based on current page
- Loop through all posts, show attachment if there
- Suppress the_content filter in a nested loop
- Tags interfering with next_post_link();
- Simple loop with shortcode rendering problem
- How get the 10 most viewed pages (not post)
- How to close open divs in post loop
- Checking conditionals
- issue displaying variations in custom template using WPeC 3.8.9.2
- Search Results not displaying for multiple word search
- All post ids are the same after this query but rewind_posts() does not seem to work here?
- Not Found when using activity stream as front page with BuddyPress
- Why does the first loop take arguments from the second loop?
- have_posts() return false on single post
- How to defeat “Blog pages show at most __ posts” setting in the loop?
- Display Page featured Image as well as Posts featured Image
- WordPress Loop with Custom Post Type for Bootstrap Accordion [closed]
- Why am I getting posts back when I shouldnt
- custom theme’s search not working
- Is there any reason that other theme elements (such as nav menus) shouldn’t be within the loop?
- WordPress search results grouped by post type
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?
- Custom loop menu is not working