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

learn more… | top users | synonyms

0
votes
1answer
17 views

DIVs not showing correctly on CPT?

I've been trying to figure out a little problem since yesterday. I made a CPT that is supposed to be posts that are styled and use the same template as regular posts in wordpress. When I bring up ...
0
votes
1answer
20 views

How to Manually Code Shortcode?

I'm looking to insert a function which is otherwise denoted as a WP shortcode. The page is failing to display entirely when this code is inserted. Here is the full code which comprises the shortcode: ...
0
votes
1answer
21 views

Link from archive-page.php to single-page.php

I have archive-page.php, where my custom posts are displayed. I want to put a link on my image, <a href="" alt=""><img src="" alt=""></a>, which leads to single-page.php for that ...
3
votes
1answer
55 views

How to modify single.php in a child theme?

My WordPress site uses a child-theme (of the default twenty-sixteen) and now I would like to insert a new line into the single.php file. I know that it's better to use the functions.php file of the ...
0
votes
0answers
29 views

Related products Woo-commerce

I am developing an custom non Woo Ecommerce site into it .All I require is to move related products information to my side bar. Right now I have random products on my single.php. The sidebar named ...
0
votes
1answer
21 views

Display Taxonomy Term for CPT on single-CPT.php

I've been having issues with this all morning and need some help. So I made a custom post type called Equipment, then made a custom taxonomy called Equipment Types. On single-equipment.php I can get ...
0
votes
1answer
46 views

List posts of assigned categories in list of all categories on single.php

here's what I'm trying to accomplish: I've got several categories, each of them have several posts. Now, on category.php I'm able to output a list of all categories and, inside this list, show a list ...
0
votes
2answers
21 views

Using single.php from plugin folder instead of default template folder

I am trying to figure out how to use another single.php for a custom plugin I'm making. It's for a custom post type. Because if people install this plugin, they won't have the custom ...
0
votes
1answer
64 views

Load different single.php templates according to post layout selection

I have created a way of choosing different layouts for posts(sidebar right, sidebar left, full width). This is done through a meta box that displays radio buttons with an image for each layout type. ...
0
votes
1answer
16 views

Wordpress not using edited image

I have uploaded a picture to media library and cropped the image in wordpress editor but when selecting the edited image http://mariehelenesund.se/wp-content/uploads/2015/11/Kicki-e1447542665309.jpg ...
0
votes
1answer
50 views

pagination redirecting from page number url before page requested

I have a CPT called staff. On their single-staff.php pages i have a list of items they are related to. This has become too long so now we want pagination. I can create the page links fine but it ...
0
votes
0answers
21 views

Start directly with first image of gallery

I would like to link users directly into the first image of my gallery. When the user clicks on a new post on my homepage, I want them to see the attachment.php right away, without going to the ...
1
vote
1answer
47 views

Posts of custom post type load the page template

I make a custom post type named "event". The weird thing is when I visit a post in this type, it shows the archive-event template. If there's no archieve-event.php file, it loads the page template. I ...
0
votes
1answer
34 views

how to change single post link

I have made a website for a client which involves products tab in navigation. Products are the posts that being posted in "posts". I have a front-page.php which is static. posts are displayed in ...
0
votes
1answer
59 views

Add caption functionality to custom WordPress theme

Hi I am working from a custom theme created by my predecessor and I am trying to add caption functionality to the theme but I am have some trouble with it. Presently if I insert a image into a post ...
0
votes
0answers
26 views

passing category name from category.php to single.php

It's the first time I used WP. I just use a small portion of it, because I already had my website ready. So the only section that uses WP is the blog section. I finally was able to implement it has ...
0
votes
0answers
13 views

how to create Multiple pages after one another in single page. other than home page

I am using zerif pro theme for my site . I need pages displayed one after the other , in other than home page. Please help and explain in detail.
0
votes
2answers
83 views

How to Fix Custom Wordpress Loop with Pagination on Single Post View?

I have a custom post type called "Releases" set up and paginated perfectly using the following code: The Loop <?php $paged = (get_query_var('page')) ? get_query_var('page') : 1; $args ...
0
votes
0answers
16 views

Is it better to set social media sharer in entry-footer.php or comments.php in Wordpress blog?

I'm now deciding where should I put social media sharers. Currently, I'm now putting sharers code in entry-footer.php. But is it more semantic to put sharers in entry-footer.php, in the bottom of ...
0
votes
1answer
67 views

Is possible to do this from function.php

In my single.php (my template Luna) I have this code: <?php if ( has_post_thumbnail( $post->ID ) ): ?> <header class="page-entry-header" style="background-image: ...
-1
votes
1answer
29 views

Custom Post Type archive above Single Post in single.php (same author)

I don't know if this is possible but I'd like a separate cpt archive type of loop above the normal single post loop. Something like this in single.php archive-cpt (loop) single post (loop
0
votes
0answers
29 views

Menu not working properly with left click

I am working on a single scrolling page site and the navigation. The menu works fine for navigating to different areas of the current page. however there are 2 links to pages on on the same site and ...
0
votes
1answer
236 views

How to display category wise posts on seprarate template

I have create custom post type and custom taxonomy. /* Custom post type */ function create_post_type() { /* models */ register_post_type( 'models', array( 'labels' => array( ...
0
votes
1answer
50 views

permalink to single page

I have a certain post displayed and each post i click go to single page which shows more details of the post. But i have different templates for the post details which will be shown in single page. ...
0
votes
1answer
33 views

“post-name” Renders Using page.php, but “post-name-2” renders with single.php

Page One is rendering using my page.php template. Page Two, set up exactly the same as the previous one, is rendering using my single.php template. I want Page One to render using the single.php ...
2
votes
1answer
17 views

Help with figuring out the future post workaround

I'm posting this hoping to learn a bit about filters and $wp_query. I researched how to show a single post with a published date in the future when not logged in and found out that you can do ...
10
votes
3answers
1k 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
35 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
69 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
72 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
35 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
63 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
16 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
41 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
43 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
24 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
28 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
44 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 ...
4
votes
2answers
550 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. ...
1
vote
0answers
392 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
139 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
91 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
490 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
90 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
78 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
47 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
50 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
113 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
243 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
30 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 ...