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

learn more… | top users | synonyms

8
votes
2answers
608 views

What is singular.php?

From 4.3 we have a new template, singular.php. I tried to understand what is it, but I didn't get it. :) The page.php for pages. The single.php for every post types. If we have single-[post-type].php ...
0
votes
0answers
25 views

2 different templates for 1 query

I have a working query with some custom meta fields (among others ACF Gallery field) which displays news on "News" page. I have also second page named "Gallery" which is quering posts by gallery ...
0
votes
1answer
35 views

How to call custom single post?

newbie here playing with php stuff, wanna learn. So the problem is. I have created custom posts and data from those is shown in a widget. Now i want to create custom single posts for those custom ...
2
votes
1answer
28 views

Disable Single Post View for Specific Taxonomy on Custom Post Type

we have a somewhat unique problem with a specific Custom Post Type that was developed for a client. It basically boils down to a need to disable the single post view for any posts that have been ...
0
votes
1answer
23 views

Handling single.php in Multisite

I'm using sub directories for my WordPress multisite, posts are controlled with single.php. How can instruct single.php to use a different header and footer file for the site in the sub directory? I ...
0
votes
0answers
29 views

Show Post title and featured image outside of the box

I'm trying to work out my idea to show post featured image and post title outside of the post content. Let me explain better. I'm using underscore framework. There are three files there. single.php, ...
0
votes
0answers
12 views

Grabbing Custom Single Post Template displays WSOD

I'm trying to use a custom Single Post Template & call it via my single.php (It wasn't drawing from single-press.php otherwise) My main goal is to have the Custom Single Posts not display the ...
0
votes
1answer
25 views

Custom Single Post Type not referring to single-post-type.php File

I've defined a Custom Post type called "Press", I'm trying to modify the Single Posts template for that Custom Type. The single posts custom file is called "single-press.php" I've tried using an if ...
1
vote
1answer
32 views

Post Rank on Single Post page based on custom field

As per my previous question. How to show posts rank based on custom field value It works perfect on homepage as I wanted. Now I want to show the same rank in single post pages also.
0
votes
1answer
22 views

Different post into a single page

i am having a little trouble here. Well what i am exactly trying to do is post posts into different divs in my wordpress template in a single page. How am it to achieve different posts in different ...
0
votes
0answers
23 views

does it need any special functions to write in function.php?

does it need any special functions to write in function.php of template for single-{post_type}.php? I created a custom theme , but it does not move the single-{post_type.php}, my page is ...
0
votes
0answers
32 views

Disable single post page in wordpress

I hate how when you click on a frontpage post (I have mine layed out in columns on my frontpage), it goes to the single view of the post. I would like for it to go to the blog page but scroll down to ...
3
votes
2answers
246 views

A special single page templates for posts under a category and all its child category

I have a blog in WordPress. I have multiple categories. I want to use a specific layout for all posts under a category and all of its sub categories. Example : My categories organized as bellow. ...
0
votes
0answers
202 views

Add Read More Tag to a post content (Single.php)

I have wordpress custom theme made from scratch including: header.php, footer.php, single.php, index.php, functions.php For Listing the blog list i used index.php with excerpt and read more link to ...
0
votes
0answers
64 views

Using get_template_part() to modify single.php for a custom post type

I have a custom post type plugin called shows that has custom meta such as host, time, length, etc. I want to make it theme independent and require minimum coding for it to work across a lot of ...
0
votes
1answer
68 views

WP_Query shows all posts on single post pages

Looking for assistance with WP_Query. I'm learning to create WordPress themes and I am practicing by creating a real estate theme. What I am trying to do is set up a properties page (custom post type) ...
2
votes
2answers
265 views

if is_singular array not working as expected

I'm using the following if statements within header.php to load custom tracking codes. <?php if ( is_singular( array( 'custom-post-type', 'post-name' ) ) ) : ?> // Specific tracking code ...
1
vote
1answer
45 views

How to disable single post view in wp

I want know, How to disable single post view in wp. any plugin or setting??? Is there a way to disable single post page, for example when some tries to go to single post page to show not found or 404 ...
0
votes
1answer
50 views

Code to display category-specific single.php is overriding normal single.php, too

I have two different post type categories on the site I'm building at the moment - "press" and "blog". I used the following code, inserted in my child theme's functions.php file, to get the "press" ...
0
votes
1answer
38 views

What is wrong with my WP_Query Arguments?

In my single.php file I am using a nested WP_Query to show more posts, at the bottom of the page. My code for the query and nested loop are as follows: <?php $ep_args = array( ...
0
votes
0answers
36 views

Can a single.php file be coded to allow HTML download from a button?

I have been searching on WP and on SO for a way to code a custom-single.php to allow the HTML code in that document to be downloaded from a button on the rendered site. What I have done is created ...
0
votes
0answers
53 views

Hide Certain Tags on Single Post Page

I'm trying to hide certain tags from single posts pages. I've googled and found 2 codes but both are hiding the whole post page. I'm using a theme that needs using 2 tags ticker and slider to show ...
0
votes
2answers
118 views

Get term name without a foreach loop

I currently have this: <?php $terms = wp_get_post_terms( $post->ID, 'artist-genre'); foreach($terms as $term) : ?> <li> <?php echo $term->name; ?> </li> ...
0
votes
1answer
24 views

Pulling in Related Posts based on Post Type array

I'm trying to create a Related Posts section on my single.php file and I'm using this as a starting point (http://www.wpbeginner.com/wp-tutorials/how-to-display-related-posts-in-wordpress/) and my ...
1
vote
0answers
55 views

Issue with loading mobile specific custom single page layout in mobile

Hello I am in the middle of theme development which has specific layouts for mobile, I built a custom function to detect mobile and load mobile specific layouts in mobile view ports. Here is the ...
0
votes
0answers
57 views

How to parse a post and change the way a gallery item is rendered?

I want to use this plugin http://final-tiles-gallery.com/index.html to display the gallery the users insert in their posts, for that I need to use an specific HTML structure so the plugin works, I've ...
0
votes
0answers
218 views

Load a single post into a modal

Another one for you guys. I'm trying to load single.php into a modal. It loads, but then it loads the content into the target to open the modal. The Call: <a href="<?php the_permalink(); ...
0
votes
0answers
35 views

Previous Next Post Link by Post Rank Value Stored in Another Table

I'm using the Q2W3 WordPress plugin to sort posts by category. This plugin allows a drag-drop interface to change the default post order and modifies the standard taxonomy output so that posts on the ...
0
votes
2answers
31 views

Best way to allow for extended use of Wordpress functions inside single.php

I am building a more-or-less distinguishing layout which forces me have a header far above the content in the DOM. A structure as follows: <?php get_header(); ?> <div id="wrapper"> ...
0
votes
0answers
26 views

Is it possible to show actual breadcrumb to the page?

For example user search any thing in post like "Hello", then result will shown on search page matching with "Hello". When some one click on any of result, there is a breadcrumb which navigates upto ...
0
votes
2answers
103 views

Blog post - single.php url

I have a simple blog page that just lists blog posts on a page called 'news' http://my-site.co.uk/news I have a single.php page to display the actual post when it is clicked on 'news' The ...
0
votes
1answer
124 views

Content-single.php inside my plugin

I have implemented inside my plugin this hook to change the single template for custom post type (I do not want it to be in the child theme, just in my plugin) and it works just fine. Now I want to ...
1
vote
1answer
2k views

Proper way to load a single post via Ajax?

I'm loading single posts via Ajax into a div that I have set up on my index page. Everything is working fine in this regard. I want to use history.js to push/pop the state so if users enter ...
0
votes
3answers
674 views

Single page site + pushState?

I have a single page site with posts that get loaded via Ajax on the same page via slide down div. When a post is 'activated,' I want that state to be set so that when I visit the url directly, it ...
1
vote
0answers
39 views

Issue on single.php pagination WordPress

I faced weird issue on single.php. I used previous_post_link('%link', 'Previous'); and next_post_link('%link', 'Next'); for next previous in single.php, it's working perfectly, but its work on all ...
0
votes
1answer
25 views

trying to show single post but displays all post on a custom post type

Good day, I was trying to show a specific post when a user click on the title but all other post are shown as well, how can I filter it? for example when I click link ...
0
votes
1answer
93 views

Custom post template for particular posts

I am building a site that is somewhat of a mix between a directory and a blog. Some posts are to be typical blog posts with text and images, without any particular structure. Other posts, however, are ...
0
votes
0answers
14 views

how to put signature after a plugin output [duplicate]

Hello Im Wordpress newbie:) and I have a problem with it: On single-post page, there is signature displayed (value of bibliographical info field of profile) and after there are some sharing buttons ...
0
votes
0answers
69 views

Page Templates Used in Custom Post Type

The same question was asked here with no real response. They claim it's not possible but I have used plugins that accomplish this. In WordPress I am having a problem figuring out how to use the ...
0
votes
1answer
55 views

Highlight archive link on single.php

exist some chance to highlight archive link in classic wp archive widget on single.php template? I have the same template for archive.php and single.php where I call <?php wp_custom_archive(); ...
0
votes
0answers
27 views

Single page of CPT

I'm trying to create a single page of a CPT. My cpt: <?php // CONVENZIONI CPT + TAXONOMY function cpt_convenzioni() { $labels = array( 'name' => _x( 'Convenzioni', ...
0
votes
1answer
445 views

Thumbnail With Next/Prev Links Not Showing Next Post?

I am using the below code to display thumbnail with next/prev posts links on single.php page. It is working fine when next and prev post are from same category but not showing the next or prev post ...
0
votes
2answers
838 views

create single.php for specific category by category id

I'm trying to create template for specific category with id 1 for example. The template should be applied to all of the pages belongs to this category. So, it should be something like single-1.php. I ...
0
votes
2answers
300 views

How to get a list of term names of the custom post type im currently on in single.php

Ok so I have a custom post type of "Products" and a custom taxonomy of "Types". Now in the types taxonomy I have dozens of categories and sub categories assigned to custom post types. Custom Post ...
0
votes
2answers
218 views

Cant get paginations on single.php to work with my custom post types

I'm using custom post types and custom fields plugins for my custom post types. I have all other paginations working smoothly on my website except for my single.php. I have a custom post type of ...
1
vote
2answers
226 views

“next_posts_link” and “previous_posts_link” display me NOTHING

I'm trying to add links "Previous Post" and "Next Post" in my single.php file without success because previous_posts_link and next_posts_link dont return anything. Honestly I do not know where in the ...
0
votes
1answer
87 views

get_term_link is Ending to single.php

I have a template like this: page-movie.php taxonomy-movie.php taxonomy.php and I am using the get_term_link() at page-movie.php to list and link from the indexed page into List of all Custom ...
0
votes
2answers
142 views

Integrating WordPress with Your Website

I am intergrating WordPress with a non WordPress site. I have installed WordPress at my evercam.io/wordpress and I have followed the codex and I have been able to display a list of posts on a static ...
0
votes
2answers
129 views

How to get nav to show current_page_parent class when on regular post (not blog), differentiated by category

In order to highlight menu item when viewing single post (not blog), am trying to add special classes to single, (regular, not custom) posts from different categories. this is the basic code: ...
0
votes
0answers
27 views

Variation on a single page with CSS/Embed

I am a wordpress newbie and have a skeletal site I designed (http://theabraxas.us) which has a video and chat embed set up. I want to, on the front page of my wordpress site (http://abraxas.pw), have ...