Something like this should solve your problem…
<?php $pfportfolio = new WP_Query( array('post_type'=>'portfolio', 'posts_per_page'=>-1) ); ?>
<?php if ( $pfportfolio->have_posts() ): ?>
<ul class="thumbnails">
<?php while ( $pfportfolio->have_posts() ) : $pfportfolio->the_post(); ?>
<li class="span4" data-id="post-<?php echo esc_attr(get_the_ID()); ?>" data-type="<?php echo esc_attr(strip_tags( get_the_term_list( $post->ID, 'location', '', ' ', '' ) ) ); ?>">
<a href="https://wordpress.stackexchange.com/questions/108357/<?php the_permalink(); ?>"><span class="projekte-title"><?php the_title(); ?></span></a>
<div class="thumbnail"><a href="https://wordpress.stackexchange.com/questions/108357/<?php the_permalink(); ?>"><?php the_post_thumbnail('home-feat'); ?></a></div>
</li>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</ul>
<?php endif; ?>
Related Posts:
- Custom permalink structure only for default posts
- Custom post type single (permalink) throws a 404 error
- Custom post type permalinks breaking due to 3.1 bug fix
- WordPress not opening posts with only numbers if permalink is post_name
- Move first half of posts to one parent page, second half to the other page
- How could I change my Permalink from blog to custom structure? [closed]
- register_post_type permalink
- Changing permalink of WordPress
- Change modified date to current date when title updated automatically
- Please I want to prefix my WP posts title according to each category
- Custom Post Types and Broken Permalinks
- My posts page is missing the page title
- Hiding title of selected post without plugins
- Permalink base only for posts
- Append a random string to a post permalink
- Custom Post Title as search term
- Deleting first four characters from all Post Titles
- How remove “recent comments” title without modifying code? [closed]
- Default post type doesn’t display in url
- Changes done in admin panel are taking time to reflect in the REST api responses
- Trying to use AngularJS with WordPress without any API
- Automatically add date to the auto generation of post slug
- How to handle broken links created by permalink/slug changes?
- Permission issue with custom post type – not added to menu – by plugin
- Duplicate Custom Post Type and Taxonomy Slug
- Visting slug for ‘post’ post type shows 404 not archive?
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- Take a received feedback item, turn it into a post
- Getting value from get_post_custom
- WP Admin register taxonomy and post type performance
- Add a custom meta box in the post options that loads some html code in the header
- Static posts page with home.php
- Any way for get_next_post() to use the actual post order instead of publish order?
- Calling Different Custom Post Timestamps in a table
- how do i add posts-page slug before posts slug in permalinks
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Admin – create custom post status and display above table
- custom post template file not shown, instead all the time 404.php
- Set Default Category to Username
- sql select for post_title and a term name
- How to allow visitors to filter posts by multiple taxonomies
- show custom post type category dropdown sorting result on same page
- Custom Post Type Rewrite To Include Parent Page(s)
- Permalink doesn’t get displayed in Twitter button (Local WordPress problem?)
- WordPress is replacing double minus signs in Post Title, how to disable it?
- Retrieve post ID from “querying” URL
- Thumbnail & Category link aside post
- How do I change the core post search algorithm? Where is it found/constructed?
- hiding permalink in admin if the user is subscriber
- Why does WP_Post not contain its permalink?
- the_permalink() not working in a root installation
- Is there a way to specify an extra class for a post or page with no title?
- When changing pages to posts, how do you set up 301 redirects for the page URLs?
- How to include my own css in post
- Custom post types related to same custom post type?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- Dynamically switch template on click
- Add title for previous and next posts to Yoko Theme
- Images inside post title
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Loop doesn’t show title of second post and posts thereafter
- How To capitalize The First Letter Of Every Word In The Post Title
- Is it possible to customize the post according to post format in single.php?
- Customize rel=canonical tag for single blog post
- a little direction on custom post type
- disable Tab post on nav-menus page (Admin)
- Second get_permalink inside loop points to wrong URL
- How to show show the Second page title in the page
- Format latest/newest post differently
- How to get links to the last N posts in a specific category?
- Custom taxonomy archive page problem
- Tell WP to use a specific template file in posts
- Create a list of posts with topic headdings
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- relating business and products with custom taxonomy?
- Best Way to Add UnEditable HTML to Posts
- How safe is it to delete old posts edits to save database space?
- Two Custom Post Types with Identical Articles Competing for the same Slug
- Custom Post Type archive
- WordPress custom post type with folder structure in slug
- Using setup_postdata() with multi-dimensional array
- Blog post not showing title
- How can I remove the first two words and shorten get_the_title()
- Is codex right on deleting post?
- Custom Permalink Structure for Pages & Posts
- How do I include the category next to the title of a post?
- Check if a custom post type has already been created
- WordPress Query Posts From Category Post on Static Page
- Edit multiple custom post types while saving a new or edited post
- Create a custom posts page
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- if in category but only with post meta
- How to style archive post titles… but only those posts who have comments?
- Replace image name on upload to the new post name on front-end form
- Edit the post title from the frontend
- How to get different Related Posts
- custom word in custom permalink structure
- Why in my query is display two title?
- How to add convenient buttons for new custom post statuses
- How to allow multiple thumbnail upload for Posts?