Articles of single

Link for Most Recent Post

I am trying to make a comic website that has arrows pointing to First/Previous/Next/Latest on single.php. I’ve linked the first 3, but I’m struggling in figuring out how to link to Latest. It doesn’t feel like it should be that hard, but Google only gave me ways to link it in the menu. Here’s the […]

Custom Post Templates

The Issue: I am looking for custom single post templates, to add or remove individual elements as a function of a normal single post. There are a lot of ways to create custom post templates for single posts within WordPress. Especially post formats are a great chance to use default templates for default cases; however […]

Insert After Second Paragraph Without <P> Tag?

I use a code like the one shown below to insert ads after the first paragraph. The problem is that this code requires the content to be displayed within paragraph tags and I would like to use this code to insert a DIV. When I simply replace the tags with div tags the code no […]

Add code just after Post content

I am in a bit of dilemma here so bare with me. I want to add something like this code just after the content in a post: <p>Please let me know what you think by <a href=”#comment”>leaving a comment</a>!</p> To do this, I edited single.php and added it after the content. However, the problem is […]

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 Type Item: Blue Car Categories assigned to car: Honda > Accord > LX So what I am trying to […]

custom single.php not working

Trying to solve this issue for the past hour and I can’t figure out what’s going on. Trying to create single-blog.php (I have a few posts which are under the category ‘blog’) but WordPress automatically redirects these posts to single.php! I’ve flushed the permalinks by settings > permalink > save changes but still nothing happens. […]

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 redirects itself to a URL without the /page/number. http://wonkhedev.jynk.net/staff/mark-leach/ main page http://wonkhedev.jynk.net/staff/mark-leach/page/2/ page 2 link but […]

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 page.

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?

is_singular() not working if called via callback function of admin-ajax.php

In my single.php I’ve some code like this … if(is_singular(‘post’)) { echo ‘Blog’; } else { echo ‘CPT’; } If I approach single.php from blog or CPT index page by using the_permalink(), this condition works correctly. It show ‘Blog’ when I open single blog post and shows ‘CPT’ when I open single CPT. Now the […]