The single tag has no wiki summary.
4
votes
2answers
445 views
Posts in multiple Categories different single.php
I am smashing my head against some code.
Here is the situation:
I have one post in 3 different categories, this post has to be visible in "category 1" with the single1.php, in "category 2" with ...
3
votes
2answers
615 views
How to detect single.php (but not single-portfolio.php)?
When I'm using is_single(); in my <head> section to add some style to website navigation it executes correctly on blog posts but it also executes on single "portfolio" post type posts (so ...
3
votes
1answer
775 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 ...
2
votes
3answers
2k 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 ...
2
votes
2answers
171 views
Make custom post type display as a page
I am trying to make my custom post type display on the front end as if it were a page. Depending on the theme, it won't have the date, author, etc...
I've looked into creating a template such as ...
2
votes
2answers
540 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') ) {
...
2
votes
2answers
427 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 ...
2
votes
1answer
358 views
HTML code in Custom field
I'm using a custom field to display images in a slider on each post, but when I update the post after having entered the HTML code in the custom field, the code disappears. I'm assuming that there is ...
2
votes
2answers
87 views
single page site with subpages
i want to make a single page site which has subpages with following structure
about us
team
-member1
-member2
contact
and i want the output to be like
<div class="about-us">
team content
...
2
votes
3answers
718 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 ...
1
vote
3answers
371 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 ...
1
vote
1answer
71 views
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 ...
1
vote
1answer
841 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 ...
1
vote
1answer
873 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
489 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 ...
1
vote
1answer
315 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
351 views
How to check if the product is in a certain category on a single-product.php in Woocommerce?
How in the world can I check if a product is in a certain product category on the single-product.php?
<?php if (is_product_category('audio')) {
echo 'In audio';
...
1
vote
2answers
695 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
2answers
544 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
793 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 ( ...
1
vote
3answers
493 views
Custom post type not displaying content from single-{custom post type} page
I am trying to create a custom post type with taxonomy and a shortcode for my custom search in a plugin.When I activate my plugin I see my CPT and taxonomy on dashboard. But when I publish the post I ...
1
vote
1answer
173 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 ...
1
vote
1answer
178 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.
...
1
vote
2answers
636 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 ...
1
vote
1answer
119 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 ...
1
vote
1answer
204 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 ...
1
vote
1answer
427 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 ...
1
vote
2answers
1k 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
3answers
1k 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 ...
1
vote
0answers
34 views
Related Posts by Multiple Tags?
I was curious if was possible to display related posts by multiple tags.
The site I am working on has about 5 tags per post. Most posts have 1 or 2 tags in common. The related posts I'd like to show ...
1
vote
1answer
38 views
How to show single post page as home page
I want to start a funny images website but I have come across a dilemma. I want the website to display 1 post ( not the thumbnail) but the full post on the home page. (the most recent post). Similar ...
1
vote
0answers
53 views
How to make the link to the category for a post go to corresponding page number in archive?
For instance, I am at http://url.com/single-post and in the post there is a link to the category that navigates to http://url.com/category/page/3/ which is the corresponding archive page that contains ...
1
vote
1answer
76 views
How do I display a custom field from a custom taxonomy in single.php?
I know that the following mysql query produces the exact results I wish to echo within single.php:
SELECT meta_value
FROM `wp_taxonomymeta`
WHERE `taxonomy_id` =565
AND `meta_key` LIKE 'baseurl'
...
1
vote
1answer
115 views
Single post comment template not working
I cant get the comments template to show up in my single-events.php
This is my code
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'events' ); ?>
...
1
vote
0answers
83 views
Adding range to wp_link_pages();
I have some very long posts, some have more than 50 pages() and when using wp_link_pages it give me 50 internal post links, clearly this isn't usable.
How can I add a range to the wp_link_pages ...
1
vote
0answers
58 views
Modified loop-single-forum.php to work inside of a sidebar Widget, not working on some site pages
So I took loop-single-forum.php, copied it and renamed it, fixed it so the site is calling the copy and then removed what I did not need from it to place it in a sidebar widget. It works beautifully ...
1
vote
1answer
266 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 ...
1
vote
2answers
188 views
Multiple Single Installs of Wordpress with a central user base
Im sorry that I am asking this but I have been searching for ages and for some reaseon the suggested custom user table dosn't work, it just gives me a username error.
This is the code I am taking ...
0
votes
1answer
496 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
2answers
117 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.
0
votes
1answer
164 views
is_singular won't call my functions?
Hi i'm using this code to call for a different stylesheet for a single post type but the problem is, It won't call the stylesheet.
It's in header.php, i also tried placing it in single.php
<?php
...
0
votes
2answers
202 views
Custom seperate Single.php
In my site I have a blog where each posts loads single.php like normal wordpress installation.
I also have a "shop" custom page where each links also loads single.php but the permalink is different. ...
0
votes
2answers
68 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
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.
...
0
votes
1answer
27 views
navigation link based on custom field
I'm looking for a method to order posts by a custom field so that the navigational links on a single post template would point to the next or previous post in the sequence defined by a number in a ...
0
votes
3answers
97 views
Custom post type single-{custom}.php not working
I made a custom post type with the machine name special_media_post and wordpress is simply not seeing the single-special_media_post.php. I am at a complete lose. It keeps defaulting to the index.php
...
0
votes
2answers
100 views
Using previous_post_link and next_post_link to wrap around post sequence
For a single custom post type, I'm using previous_post_link and next_post_link with simple arrows. (Although text arrows are shown here, in the actual I'm using graphics with the text hidden via CSS.) ...
0
votes
1answer
161 views
Single Post in Tab/Slider
I have managed to code tab system that fetches different categories and custom taxanomies on a home page and shows relative posts. Now, is it possible that when someone clicks on one of the posts in ...
0
votes
2answers
481 views
How to get category id in single.php wordpress?
I need to get category id in single.php. I tried this:
$cat_ID = get_query_var('cat');
It didn't work. What should I use instead?
0
votes
1answer
71 views
How to direct user to actual 404 page when a check is false in single.php?
Can someone tell me how to direct a user to the main 404 file instead of having to print an error message saying "file not found" in single.php?
For example:
<?php
if (!$myVar) {
// go to ...

