The single post template. Used when a single post is queried.

learn more… | top users | synonyms

0
votes
2answers
89 views

Adding comments to my custom theme

I would like to add comments to my single.php file. My custom theme is "hand built" and I haven't found the proper code needed to add this functionality. Anyone have the quick and dirty on how to add ...
0
votes
1answer
232 views

infinite loop on page with comments after changing comments.php and header.php

I am using version 3.3.1 of wordpress but I'm following a tutorial that used version 2.7. After changing my header.php and comments.php code, I'm getting an infinite loop when I view the single post ...
3
votes
1answer
1k views

single page wordpress

I like wordpress as a CMS and I think it's got a lot there with it's vast plugin library however the front end, dare I say it is a bit out of date. I don't like the system of old going page-to-page ...
1
vote
1answer
226 views

How can I make a post that belongs to a category or have specific tags, display different from the other single posts?

How can I make a single post display different from the other single posts when I add it to a specific category. example: I have a post that is in 3 categories: music, songs & video clips. I ...
0
votes
1answer
211 views

Wordpress, alternative single post template

For a project of mine I need to define an alternative template for single posts. To be more specific I need each post to be displayed as usual when the website is browsed but I need to create ...
1
vote
1answer
256 views

Display all posts that were published before full post on single.php

The way I would like my blog to work is a user clicks on a post that was published on 12th March 2012 (for example) they get taken to single.php where the content of that post is displayed as normal. ...
2
votes
1answer
1k views

Pagination for custom query on single.php

I'm building a site and the basic structure on most pages is as follows: <!-- content query --> <!-- recent posts preview query (paginated) --> <!-- related posts preview query ...
0
votes
1answer
1k views

Disable single post page

Is there a way to disable single post page, for example when some tries to go to single post page to show 404 page.
0
votes
1answer
256 views

Best way to modify content from index.php to single.php?

My blog has simple posts including a youtube videos. For example: <iframe width="460" height="342" src="http://www.youtube.com/embed/PkxteedBq9g?rel=0" frameborder="0" ...
2
votes
2answers
839 views

How to display different single post template based on author?

My current singlepost.php makes use of the following if conditions and renders the appropriate template. <?php $post = $wp_query->post; if ( in_category('4') || in_category('59') ) { ...
1
vote
1answer
625 views

Problem getting single_template filter to work - I want to serve a different single.php file for posts in a certain category

I am trying to customize the behavior of my blog to serve a specific single post template based on the category the post is assigned to. I came across this filter in my parent theme which is what ...
0
votes
1answer
430 views

Function to allow single post template based on custom taxonomy?

I'm trying to use Justin Tadlocks function for category specific custom post templates, but have become stuck when trying with a custom taxonomy, as his examples only have normal categories. Can this ...
0
votes
1answer
455 views

Get Child Custom Post Content on Single.php?

I have a custom post type, with children 2 rows deep... Outfit 1 Inner Child 1 Child 1 Child 1 Child 1 Outfit 2 Inner Child 1 Child 1 Child 1 ...
1
vote
3answers
758 views

Is it possible to use a single custom post as the site front page

I know I can set a static page as the homepage but is it possible to set a single custom post as the site front page? I created a custom post type called "portfolio" where users can add all the work ...
0
votes
1answer
176 views

Conditional single.php statement not recognizing conditionals

I have tried every possible way of making this conditional work and it's skipping the in_category conditionals and going to the last option. This is my code in single.php: $post = $wp_query->post; ...
0
votes
1answer
416 views

Need post_type_archive_title function but in 'single'

I'm trying to pull a custom post type name/title out for use in the breadcrumb of a single-[cpt].php template file. In the archive-[cpt].php I can use post_type_archive_title() and it echo the name. ...
0
votes
1answer
461 views

Inserting custom fields into single.php

I am trying to get a custom field to show straight after the main body of text in single.php BUT before the Outbrain and Facebook Connect boxes. If I put the line to show the address above <?php ...
0
votes
2answers
160 views

plugin to hide selection of text from post from frontpage

is there any plugin that will add new quicktag, says: [hidetext]some text to hide[/hidetext] and any text inside those tag is hidden from frontpage/archive/etc. It only shown on single post page.
2
votes
2answers
2k views

Custom permalink structure only for default posts

Does anybody know how to modify the url struct only for the single post page? When I go to a post page, the url should look like: example.com/xxx/my-post. All other urls (with the exception of the ...
0
votes
1answer
320 views

Dictionary-style definition list plugin

I've discovered the types plugin, and I'm loving how simple it makes it to add custom post types and their associated field sets. One need that I've come across that it doesn't fill, however, is ...
0
votes
1answer
182 views

Portfolio & Blog cohabitation : multiple single.php files?

I'm currently creating a website that's going to be powered by Wordpress and have both a portfolio and a blog. How should I go about coding up the single.php? I understand custom post types are the ...
0
votes
1answer
87 views

Problems with my conditionals in single.php by category

In my single.php file I would like to have a conditional that checks for the category of the post and display certain images and layout. Here is what I have: http://pastebin.com/dy6TE1yr
1
vote
1answer
170 views

custom post type parsed as attachment

I have few custom post type, on the single post of which i am getting 404 error page. I think i've tried almost every solutions posted on web but still it is not working for me and i've started to ...
0
votes
1answer
218 views

Post X of Y in single.php / sidebar.php

Is there a way of putting "Post X of Y" into my sidebar? I think I can only show it when it is a single blog post (something like checking if the content is_single) but I want to be able to see which ...
0
votes
2answers
743 views

Wordpress single.php different layouts projects / posts

i'm new in Wordpress and I'm currently building my personal website where my works will be published and have a blog too. For the portfolio layout I've looked up this tutorial: ...
0
votes
1answer
916 views

Possible to paginate on single.php?

I know this sounds illogical and maybe it is, but the client's asked for it so I'm looking into a solution if possible. On a section of the site there's a link that leads to category-news.php, which ...
0
votes
1answer
809 views

What does the Global Variable $s represent?

What does the $GLOBALS['s'] variable contain? It looks like an empty array, but what would it normally hold? I've encountered it in a tutorial: The WordPress Theme: Single Post, Post Attachment, ...
2
votes
3answers
1k views

How do I create a widget that only allows a single instance?

How do I create a widget that only allows a single instance of a widget to be added through the Wordpress interface? The default behaviour of widgets allows multiple instances to be added. I am ...
0
votes
2answers
89 views

Single Page Design, Storing in Theme Options

So I'm developing a theme where essentially all content will be displayed on a single page (index). Well, the content isn't exactly conventional. In other words, it's not just a title and body, maybe ...
1
vote
1answer
239 views

Display a post map on a blank/new page

On my single.php file I am displaying the_title(), the_content() and a link to a Google Map (Javascript v3). Lat/Lng coordinates for each location map are held in two separate meta fields attached to ...
0
votes
1answer
97 views

Display “Post 2 of 4” on single post page?

I have a custom post type called Projects. When viewing a single 'project' post I have next/prev buttons to navigate through them. I also want to display text saying "Project 2 of 4" or ideally ...
1
vote
2answers
1k views

Pagination on single post page?

I've found many pagination tutorials/plugins that work on pages displaying a list of posts such as index.php E.g. - ...
1
vote
1answer
3k views

Conditional for single-{post-type}.php

Please help with this code for custom post type "video": If is single-video.php page { list custom-taxonomy of video. Example actors } Else { do nothing } I´m tried with is_single, ...
1
vote
1answer
639 views

posts_nav_link on single.php

The situation...I use 3 categories. One of them is called 'News'. This page shows on the left the latest post in the category 'News' and on the left it shows the 10 most recent posts from this same ...
0
votes
1answer
588 views

Help with a custom rewrite

The following is a snippet from single.php </div> <?php endif; ?> <?php ...
1
vote
2answers
3k views

How to show link to next posts in single.php

I can't get get_next_posts_link to work. shouldn't his code work? <?php echo get_next_posts_link(); ?> Well, I am trying to get next 5 posts, any idea how? EDIT: Accroding to: <?php ...
1
vote
1answer
568 views

in_category() works in single.php but not in page.php?

I'm using in_category(array) inside The Loop to detect whether a post is categorised into the Discussion category (or has one of a couple of slugs). This works beautifully on single.php but doesn't ...
0
votes
2answers
195 views

Can I style single post that are in multiple catergories?

I have a regular wordpress site and I am trying to make a mobile version of the same site. For the blog section, I have put all of the posts in two categories: blog and mobile. The posts in "blog" ...
0
votes
1answer
31 views

Thumbnail Image to go in the post aswell

I have looked everywhere but I cant see any clear answers, a lot about getting a thumbnail image. But I am after having the thumbnail which was uploaded to the post to also be in the post just made. ...
2
votes
3answers
4k views

get taxonomy name of current post

Hierarchical taxonomy of custom post type 'projects' > 'projects_category'. Two example 'projects_category' hierarchies would be: Big Corporates > 1st Company Name > A Post Title Small ...
0
votes
1answer
297 views

twenty eleven single.php

I am using twenty-eleven theme for my site, I just saw that in single posts page, .i.e single.php, the sidebar is absent, which means no widgets in single.php page How do I bring it back
1
vote
1answer
659 views

how to know if the post has pagination (<!--nextpage-->) or not

i need a solid solution for checking if a post has pagination or not, regardless of the number of current page in the pagination, and even if the post is in the first page of the pagination. the check ...
1
vote
3answers
2k views

How to convert multi-site to single site

I need to take a site that is installed as a subdomain blog on a multi site install and move it to it's own domain on a standalone wordpress installation. How can this be done? I am running into ...
0
votes
1answer
123 views

“Home” Page now only displaying the single latest post

We did have a normal dynamic post home page.( Arjuna X 1.6.11 by SRS Solutions) After selecting for a static, we returned the settings to our original settings. However, now we only have the single ...
2
votes
2answers
532 views

Best way to programatically add “rel” attributes to page and post images

For single posts and pages, I would like to add certain rel attributes to all the images on the contained therein added with the "Add Image" functionality on the edit screen. The attribute would be ...
1
vote
2answers
805 views

In need of array of post tags

On the single-post page within the loop I need an array of the_tags() which is a string. and get_tags() gives me all of the tags not only this posts. Is there an easy way to get this?
1
vote
1answer
1k views

Can't get the_content of the parent page from its single post?

This is a page that list posts witht he category Content (CDs): <div id="tagline"> <div class="container"> <?php // Run main loop (The Loop). ?> <?php if ( ...
0
votes
1answer
717 views

Conflict in function to allow single post template based on category

I've used Justin Tadlock's great function for category specific custom post templates many times, where you can use single-cat-id.php for single posts belonging to a specific category. I just ran into ...