Tagged Questions
0
votes
1answer
21 views
wordpress taxonomy results
I am using taxonomy.php to fetch some rows from database. On taxonomy page the function get_queried_object() shows that I have got the right results from database but wordpress loop if ( have_posts() ...
2
votes
1answer
28 views
Can't show comments count per post outside loop
How can I show the amount of a comment per post outside the loop? I tried this in a function already:
' . get_comments_number . ' , but that outputted the text "array" on the screen... What do I have ...
0
votes
2answers
34 views
“Right Way” to make custom Loop respect reading settings inside admin panel?
I have created custom Wordpress loop using WP_Query, loop is working fine and I can customize it nicely, however i have a problem using "Blog pages show at most" settings, for example inside my loop ...
1
vote
1answer
24 views
Reverse chronology of post listing
I"m working on modifying a theme that is based on 2010.
I want to make the posts on this blog display earliest to oldest, but I don't see how to do this in the theme:
I understand I need to add . ...
0
votes
1answer
58 views
add <div> to end of post in the loop with plugin
I'm looking to add a <div> with some more html content to the bottom of specific posts in the loop. The the_post action can be used to add the <div> to the beginning of the post in the ...
0
votes
1answer
19 views
Get post category as a separate string and url
I need to figure out how to get post category as a string and link, both separate from each other.
So the return would be something like:
Uncategorized
http://link-to-the-category.com
however both ...
0
votes
0answers
35 views
Avoid duplicate posts from sidebar widget on homepage?
In a normal dynamic sidebar of a theme's homepage template the sidebar widgets display lots of duplicate posts on the front page.
It shows "recent posts" and posts from certain categories in main ...
0
votes
1answer
50 views
How to display posts on a static page? (like search loop)
How do I display the loop inside a static page? Like the loop when I use the search (which in this theme it's actually working) or on index.php
An example for what I'm saying can be seen here: ...
0
votes
1answer
51 views
Getting rid of the blog page entirely
My goal is to not use a separate blog page but end up with a structure like this...
http://domain.tld/page/comments/
I believe I can do this with the Cornerstone plugin ~ [ ...
0
votes
1answer
29 views
Pulling in a particular post into a single page based on the post id passed into the code
I currently have a page on a site that I am developing and that contains a loop which loops through 4 posts contained in a custom post type called Treatments. ...
0
votes
0answers
84 views
Foreach displaying all posts and not the value set in WP back end
Pagination just isn't working correctly with my foreach code. I have to manually set the post per page count for it to work but I'd like it to use the WP back end value (Set in settings > reading) ...
0
votes
2answers
51 views
older blog posts not showing in new theme
I have a new, custom theme that I've uploaded on a pre-existing site/blog. Everything seems to be working ok, with the exception of the older blog posts not showing up. Any ideas what I can do to fix?
...
0
votes
1answer
38 views
How to order posts in an arbitrary order?
I need to list posts in a very specific order that has nothing to do with the date of the posts or the title, or anything WordPress can figure out for me. I need this order to be used when I list ...
1
vote
2answers
77 views
Child_of not displaying all children posts.. via get_posts
I have put together this loop to display all children posts of the desired cat, but i am not getting any of the posts from one of the children cats..
Not sure if i am using the best method to ...
0
votes
1answer
38 views
single.php fires more than once after clicking on any post to view with different post id each time
I am now experiencing a wired problem with my wordpress installation. I was surprised when I saw post view counter of another post also increased including the the post on which I clicked to try and ...
0
votes
1answer
199 views
Why WP_Query('showposts=5') shows only 1 post?
I am trying to do a simple query to get the latest 5 posts into an unordered list, but this is only showing 1 result even though I have several posts. I even did an offset, but it shows the next post ...
1
vote
1answer
137 views
How to filter posts that belong to a specific category only if that is the only category
I need to filter posts that belong to a category only if that is the only category. For example if my post A belongs to cat1 and I don't want to display posts that belong to cat1, post A won't be ...
0
votes
1answer
29 views
Limiting the amount of posts retrieved by the loop
I'm using a theme which has its own homepage which is created using the theme options (i.e. so can't add content under Pages) so I'm trying to add the latest posts on the page, I have copied the code ...
0
votes
0answers
24 views
All posts not being displayed [closed]
I have built a site that uses the "posts" type to display their galleries as normal posts. It is set to be sorted by custa meta date and continue on down the page.
As of right now, I have made 15 ...
0
votes
2answers
40 views
Plugin is creating posts twice
I have code which takes some $_POST data and loops through it. In the loop, I store the $_POST data in variables and create a new post using those variables. The loop ends when I run out of $_POST ...
0
votes
1answer
66 views
Display 3 posts with different HTML markup using a loop
I want to be able to display 3 posts from the same category on my index.php page, but due to the way my site's HTML/CSS is coded I'm having some difficulty understanding the correct way to go about ...
0
votes
1answer
88 views
WP Query - duplicated posts once including tags in search results
I running WordPress on IIS & SQL server. As some of the plugins do not work correctly with DB ABSTRACTION I am using a lot of functions.php filters as so on.
To make my search results include ...
3
votes
1answer
87 views
Search widget breaks when using multiple loops?
I have created wordpress template that uses two loops via WP_Query object. Everything works fine except Search widget. I've been pulling my hairs out for three days now Googling like a madman,but ...
0
votes
1answer
98 views
How to get posts published on the latest date?
Is there a way of getting all posts published on the latest date? It might not necessarily be today, it might be yesterday or the day before yesterday or even a day last week.
0
votes
1answer
112 views
Styling first post using Advanced Custom Fields
I'm working with a company's About page. I created a custom post type for "Employees", and am using the Advanced Custom Fields plugin to create simple meta boxes for name, title, image, and bio.
The ...
0
votes
1answer
96 views
Pagination for normal (standard) posts on a page with a custom loop?
probably a rather straight forward question.
my "homepage" is not the blog-page. I have a page-template named page-knowledge.php which has the following loop on it.
<?php
echo '<ul ...
0
votes
2answers
130 views
Display all posts from specific categories on a page
I want to display all posts from specific categories on a single page.
Therefore I edited the page.php file in my theme folder.
I added an 'if-clause' to check which page currently being displayed and ...
0
votes
2answers
124 views
How do I stop the loop from repeating in my category template?
For some reason, when viewing a category, the posts are repeated - basically the whole loop repeats as many times as there are posts for that category.
E.G.:
If category_a has 3 posts, the page will ...
1
vote
1answer
156 views
How to add tags (custom taxonomy) to post class css?
I am trying to figure out how to add my custom taxonomy for tags to the post class css when I already have added the custom taxonomy for categories. The code Im currently using to add the category ...
1
vote
1answer
116 views
Count singular post views automatically
I'm trying to add some function to each loop called in the themes. What I'm doing is I add a function to count post view from here post views without plugin, to use the function I need to add this ...
0
votes
1answer
200 views
Changing wp_link_pages() to “Next Page” and “Previous Page” buttons?
Currently I am using <!--nextpage--> to split a post into multiple pages, but I would like to change from Pages: 1 2 3 4 to Next Page and Previous Page links similar to what you see on this ...
0
votes
0answers
62 views
Get_Posts() isn't returning the correct amount [closed]
I am using getPosts to retrieve a list of posts in a certain category. However, if I set a category the function only returns 6 posts. However, if I use the function without setting a category, it ...
0
votes
0answers
13 views
Display the most recent post from multiple categories [duplicate]
Possible Duplicate:
Display only the latest post from multiple categories
I have been searching and attempting solutions for over a week with no success. I'm trying to display post ...
0
votes
1answer
58 views
I can't find the relevant part of the loop in my theme file. How do I find the full content with “More…”
Brunelleschi is based on the Twenty-Ten theme, but has really grown since then. I like my theme, but I'm trying to modify the way a posts in page plugin works and I need to copy the relevant part of ...
0
votes
2answers
83 views
Alternating post layout
I am trying to create a layout with two different divs alternating vertically.
For example the even has to be: picture + content; and the odd has to be: content + picture.
Here is my code, at the ...
0
votes
4answers
372 views
Multiple loops in same page, without duplicate content
I'm trying to make a page with multiple loops, I need every loop to display a predefined number of posts from the same category (every loop displays X number of posts from Category CATS). But I also ...
0
votes
1answer
67 views
Conditional for a Single Post That Belongs to a Category?
I have categories like gaming and movies on my website and when a user visits any of these categories the content in the sidebar is displayed depending on the category they are in. So gaming content ...
0
votes
1answer
99 views
The_excerpt() doesn't parse <!--more--> - how to change that?
I'm using the_excerpt(); in blog.php file (post listing page) and it doesn't recognize <!--more--> if "Excerpt" field is empty and it grabs the beginning of the content as excerpt.
This issue ...
1
vote
2answers
57 views
Multiple loops are not reset
My lovely colleagues have once again designed something that gives me a hard time getting it in Wordpress. Surprisingly it's something that I have done multiple times before; having recent posts and ...
0
votes
1answer
130 views
Converting multiple loops into one single loop with pagination
I am using Isotope jquery plugin to filter/sort posts in Wordpress but to correctly filter the posts into the right order I have needed to output each category one after the other. To do this I've ...
1
vote
2answers
70 views
I would like to have different styles for my posts based on the content of each post
Here is my wordpress theme to check out(its not completely finished):
http://benlevywebdesign.com/wordpress/
This is my first time working with php/wordpress and making themes so keep that in mind.
I ...
0
votes
2answers
100 views
How to Make infinite loop of post
I am using Post contents as a slider contents, i need to make the post infinite number of loop, ie, If i view the last post after that first post should display and before first post the last post.
...
0
votes
1answer
44 views
posts going to 2 pages/categories only show up in 1
I have a portfolio website where my portfolio updates are supposed to go to both my portfolio and blog pages, as well as show thumbnails for the posts on my homepage.
The thumbnails work perfectly; ...
0
votes
1answer
69 views
Displaying posts on Homepage
I am wondering how to add a column to my homepage that shows the five most recent posts from the blog page located under the "Latest News" heading.
Here is the link to my development site.
...
0
votes
1answer
189 views
Trying to edit archive.php to only show post extract, with featured image
I am using two themes (full and desktop), so I am trying to get them to behave in the similarly.
The archive.php for the mobile theme is doing what I want, which is to just show the title and post ...
0
votes
1answer
80 views
Get the author of the latest revision
I would like to display the author (username) of the latest revision of a post from inside the loop.
I tried get_the_author(), which echoes the username and $post->post_author(), which returns the ...
-2
votes
1answer
42 views
blog post displaying within older post - loop issue?
I've got an interesting issue with my blog page-
Currently, I have two test posts- "Test Blog Post" and "Test Blog Post Deux."
Test Blog Post displayed as it should, however when I added the second ...
0
votes
1answer
122 views
How to repeat a loop after 4 posts [duplicate]
Possible Duplicate:
How to mark every 3rd post
Style every four posts differently
Is it possible to repeat this loop after four posts?
(post 5 = post 1 css, post 6 = post 2 css, etc..)
...
2
votes
2answers
508 views
The correct way to call posts with ajax
I'm trying to write an image gallery plugin with jQuery. I'm using jQuerys $.post AJAX method to send and receive info from the relevant post page. Basically I'll be looping through the attachments ...
1
vote
1answer
127 views
Most recent post from another database
I am trying to add the most recent post from another Wordpress database (on the same server in all actuality), but am getting the following error:
Fatal error: Call to undefined method ...

