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

learn more… | top users | synonyms

0
votes
1answer
20 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
26 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
16 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
10 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
30 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
10 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
33 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
13 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
87 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
18 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
24 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
19 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
46 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
67 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
534 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
332 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
31 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
18 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
39 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
38 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
38 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
22 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
253 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
442 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
191 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
127 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
96 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
58 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
75 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
82 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
20 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 ...
0
votes
0answers
31 views

How to test a WordPress plugin on a single post?

I would like to test a plugin on a single post, where the ID = 12546. I tried is_single('12546') in plugin.php and $post->ID with global $post;. Any suggestions to get this working.
0
votes
1answer
64 views

How to reorder the content of the single post?

I installed the "Related Posts" plugin and use <?php the_content(''); ?> to show my single post in single.php. When I want to add the author's name after the post, I use <?php ...
2
votes
2answers
390 views

Template for specific post of custom post type

I have the CPT "event". I have created single-event.php. I want one particular event to use a different template than single-event. I read elsewhere that this could be done by creating a ...
4
votes
2answers
112 views

How do I create a link that will always show the latest post?

If I want to create a link that will always show the latest post how can i do that? Lets say I have three post types and there are three links with posts names (like a nav list) to those post types. ...
0
votes
1answer
68 views

Insert a field with PREG_REPLACE – strange behaviour

I'm trying to insert a custom field (from the Advanced Custom Fields plugin), and I need to place it within a div which I'm wrapping around an img, right before the img-tag. So basically this is the ...
0
votes
0answers
70 views

Custom post type single display is ommited

I've created a custom post type: tutorials using generatewp.com generator and registered it with register_post_type(). I'm querying the list of tutorials in a custom page template like that: ...
0
votes
1answer
141 views

posts_nav_link on single post template

I have a post type called journal and on the single-journal.php template I am querying the rest of the journal posts like so: <?php query_posts( array( 'posts_per_page' => 4, ...
0
votes
0answers
66 views

show the post of all child category in different single page

i have parent category ('photogallery') that have 5 child category like latest,sports,business etc i wanted to show the post of that child category in another single php file that should be by the ...
0
votes
0answers
48 views

Get active term on single (CPT) page

I know similar questions have been asked here but I feel my case is slightly different. I need to get the active current term (object) on a CPT single page. However, the single post can have ...
0
votes
0answers
51 views

How do I get is_single() to return true when called internally from the_content()?

I have a custom page, e.g. blog.php?post=42 that shows a GET-specified post like so: <?php require('wordpress/wp-blog-header.php'); ?> <!-- my non-wordpress site's html goes here --> ...
0
votes
0answers
115 views

My post views doesn't seem to be counted correctly

I'm using the following codes to count my posts views, so that I can use it in a widget, but it doesn't seem to be updating correctly. I know some posts have more views than the ones showed on the ...
0
votes
0answers
36 views

Get next post in category with AJAX?

I need a simple solution to load the next post in the category of the current post (in a custom single.php) with AJAX once the reader scrolls to the bottom of the page. I'm using a custom theme. ...
0
votes
2answers
1k views

Custom post type single page returns 404 error

I have a custom post type called slide. It has content and some custom fields. I want WP to show the single.php theme or single-slide.php theme when the user clicks the slide single page link. the ...
0
votes
1answer
82 views

Style Wordpress Custom Post Type Single Page

I'm registering a custom post type 'events'. The events can be listed using a shortcode, and when you click on an event you go to the single view of that event. Now, I want this single view page to be ...
0
votes
1answer
87 views

How to check if a post is in categories x,y,z inludint their subcategories

I am trying to check whether a post is in categories X, Y, Z (including the subcategories within them). This is the piece of code I have tried in my single.php: if ( in_category(array( '1', '2', ...
0
votes
2answers
42 views

WordPress Single Conditional for Search Page

Is there a way to filter single.php so that if someone came from search.php it would display one thing, but if they came from anywhere else it would display another? Thanks, Josh
0
votes
2answers
100 views

List of users that clicked a 'Join' button at single post

The title might be a bit vague while I'm not quite sure how to describe it. What I want: At every single post (in this case of post type 'event') a logged in user must be able to click a 'Join' ...
0
votes
2answers
49 views

Comment text area in single blog post and show comments if approved

I'm modifying some existing code and trying to add the ability for user to leave comments on single post and then echo those comments based on approval. I need to add right below <?php ...