0
votes
0answers
8 views

Start WP Pagination From Number 1 in URL

I am using this code to paginate gallery post type images: $images = get_posts(array( 'post_type' => 'attachment', 'post_status' => 'inherit', 'post__in' => $image_ids, 'orderby' => ...
0
votes
0answers
24 views

Same date post in one box

I would like to ask for a little help. I wish you the same date is a Post;, you just enter the time of the WP. The twist, however, is that it is all in a box. I'll show it to be understood: ...
0
votes
2answers
27 views

Get Value of Post before

I have a normal loop in wordpress and in every post i need to check the value of the post before to compare it with the current post. -- POST 1 -- ** DO NOTHING ** -- POST 2 -- ** GET VALUE FROM ...
0
votes
1answer
21 views

Display specific posts on home page

Can someone please help me figure out if the "List category posts" plugin is the easiest solution to my problem: My goal is to be able to choose which posts are displayed on our homepage under ...
0
votes
0answers
17 views

Only show top level posts of specific category

I've been trying to create a loop that will only show the top level posts no children/sub category posts. Basically what my categories look like are -- -All --one --- A --- B -- ...
0
votes
1answer
38 views

Get first post from wp_query

How can I get the first post from a WP_Query result? $connected = new WP_Query( array( // Arguments )); // This doesn't work.. echo $connected[0]->post_name;
0
votes
0answers
33 views

How to display all posts on one page and then open them inside a modal window

I'm working with the WordPress Bootstrap theme. I want to show all the post listing with their featured image on my page and after clicking that image I want to open the post description into a modal ...
1
vote
1answer
28 views

How To Get Posts With A Specific Word

How to retrieve posts with a specific word in the loop. For example, I want to retrieve all posts with the title of the profile post (custom post type): ...
-1
votes
1answer
48 views

posts_per_page - Repeats only first posts 'post__in' array

This question correlates with a previous question I was able to solve here: http://wordpress.stackexchange.com/a/137929/28389 I am using an array for 'post__in', and I am able to run this no problem. ...
0
votes
0answers
18 views

Check for new posts in the loop every x mins/seconds

I'm trying to think of a way to check for new posts in the current loop (e.g. author, or tag) using ajax to give a live blog feel without reloading the whole page. Is it possible to 'fire' the loop ...
0
votes
1answer
51 views

The loop starting at a certain ID

Is it possible to start the loop from a certain post ID? I would like to get all the post starting at a certain ID, decendingly. To explain, I have to make sum assumptions first. Assume that my ...
0
votes
1answer
19 views

Getting posts from multiple users?

Using a third party plugin that allows users to follow each other, we can retrieve the users being followed like so (commented):- <?php if (have_posts()) : ?> <?php global ...
1
vote
2answers
41 views

Best way to assign post position in a news site homepage? (no categories, no sticky posts)

I'm currently redesigning a local news website. The old design used a whole lot of categories to handle the position of the content in the static homepage as in "top news", "middle box", "left box" ...
0
votes
0answers
34 views

post category exclusion in main loop

I have mostly posts from category A. Whereas other categories have very few posts. Due to which my main loop shows posts of category A and other category posts don't get seen much on homepage which ...
0
votes
1answer
47 views

linking to post outside the loop

Is there an easy way to link to a specific page/post outside the loop? I used the get_permalink() code as follows. <a href="<?php echo get_permalink( 164 ); ?>/post-slug/"> </a> ...
0
votes
2answers
54 views

WP_Query of Category Not Showing First Post

I have the following loop, and only this loop, in my home.php file (apologies if I didn't paste the code properly). I have populated lorem ipsum posts, and noticed that of the five posts only four ...
1
vote
1answer
77 views

How do I restart my loop with get_next_post()?

I'm looking for a succinct method of making get_next_post() double back to the beginning once it hits the last post. Currently, it stops once it hits the final post. Here are a few lines of code from ...
0
votes
1answer
80 views

Loop through posts by each term and exclude duplicate posts assigned to several terms

Okay, i'll try to go a bit more into detail. What i did with this code is getting a list of artists ordered by alphabet. In this list i'm showing all corresponding news posts to this artists term. ...
0
votes
1answer
29 views

Show post if in category

I've searched a lot for options like has_category, in_category, get_the_category, but I couldn't make them work Here's my pastebin http://pastebin.com/Zi7auvtv I want this code to run only if the ...
0
votes
1answer
24 views

Adding a category at even positions on main loop with modified pagination

I have different categories showing over main loop. I want to add a specific category post at even positions of main loop. Example current post list with categories: cat1 cat1 cat1 cat1 required: cat1 ...
0
votes
3answers
43 views

How would I get 1 latest post from a query for 5 posts?

So I have a wp_query which is getting the 5 most recent posts from my Wordpress site. What I want to do is from within this query, grab the most recent post and show this as a sort of 'hero' post, and ...
0
votes
1answer
31 views

Displaying categories items among posts

I'm making a website with lots of custom posts as well as custom hierarchical taxonomies. Default index (archive) page is made of bricks with photo, title and excerpt from posts. And here comes the ...
0
votes
0answers
19 views

Styling every second Post differently? [duplicate]

I wanted to style every second post inside of a query post and I found a solution which nearly works. the thing is: it outputs just two posts (older ones will be igrnored) but i want to output ALL ...
-3
votes
1answer
44 views

Newer/Older posts links display same posts on every page

I am using a plugin called "Types" to generate custom post types for drink/food recipes. I want to show booth drink and food recipes on the same page. The posts are displaying fine, but for some ...
0
votes
1answer
30 views

If custom field is empty, use one from a previous post

Let's say you have a few custom fields (I use the advanced custom fields plugin for it). There is an extra field in posts called 'afbeelding_onder'. It is not required but on index.php within the ...
0
votes
1answer
34 views

why does wordpress ignore the post args?

I dont get it. Straight outa the Codex, <?php // my code $cat = get_the_category(); $catName = $category[0]->cat_name; //straight outa the codex // The Query query_posts( ...
0
votes
0answers
27 views

Display Post by menu order

I want to display posts on my homepage. But I like to manage the posts using Wordpress Menu, so I can easily add, delete, and re-arrange the ordering of posts displayed in the homepage. For Example: ...
0
votes
0answers
11 views

Adding comment template on a loop into a page

I've created a loop in a page, with a single post per page. The type of post is the default "post". Now, I've resolved the problem of pagination on this page, but I cannot show the comment template on ...
0
votes
1answer
26 views

Cant' Grab WordPress Built-in Posts Through Loop

Using WordPress 3.7.1 I am trying to display all Regular Post on my created page lest say TestPage. Here are the steps I took to do this: 1- Generate a Custom Page Template called:Test Page and ...
0
votes
2answers
78 views

Make assigning post to a specific category equivalent to assigning it to all categories

Allow me to explain with an example, for the sake of clarity. Please take the time to read it all to get a good idea of what I am exactly after. On my WordPress site categories are used as Editions ...
3
votes
1answer
172 views

rewind_posts() - what actually the use of it, and where using is required or preferred?

The incomplete Codex about this, says very simply: rewind_posts(): Rewind the loop posts. As per this WPSE thread, with Eugene Manuilov's answer, I got: <?php // fetch first post from the ...
0
votes
0answers
146 views

WP blog posts index URL

I want to use WP for a site that blog is just one aspect of it, and I don't want requests to home_url list blog posts (post_type=post), I want them be to fetched using another URL. This topic ...
0
votes
0answers
12 views

Older/Newer post links display the same posts [duplicate]

I am trying to code my loop so that there are Older posts and Newer posts links below the loop, currently I am using the wp-pagenavi plugin for this but when I click the "previous posts" link, it ...
0
votes
0answers
29 views

Sort posts by each day in the loop

I want to sort the posts in the loop by each day's posts. Since I have added filter to get posts from only last week, therefore there will not be repeating days (eg. There will be wednesday only ...
0
votes
1answer
122 views

get comments and get posts in loop

I need to get posts done by specific users and get also comments done to these posts, so far I can get the posts and comments but can't get how to do it in loop properly, because now I get the same ...
0
votes
0answers
90 views

How to order query by numeric meta value?

I cannot order my query by meta value by numbers, and ordering by post order does not work too. This is my code: <?php $args = array( 'posts_per_page' => '-1', 'post_type' => ...
-1
votes
1answer
76 views

How do I create a template page to show 3 blog posts?

I have a blog theme that I created which shows one post per page. To do this I simply set up single.php the way I wanted, and I have some code that links the 'blog' item in the nav to the latest blog ...
0
votes
1answer
161 views

Loop don't work within single.php page

I have this code below within the loop <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="new-posts-form"> <div ...
0
votes
0answers
23 views

Style oldest post

I've managed to find a loop that targets both the latest post, as well as the rest of the content. However, I need to find a loop that can style the last post. Would anyone know how this is done?
0
votes
1answer
55 views

How come this loop is not working? [closed]

I've wrapped the contents of the loop within two divs. However, only the first post appears to be wrapped within the divs, leaving the latter unstyled. Here is the code: <div ...
0
votes
1answer
345 views

Use Click Image to Play Youtube Video in a Wordpress Loop

Here is my code on Playing Youtube Video when an image is clicked.. The HTML <div id="my-video" style="display:none;"> <div class="responsive-video"> <iframe ...
0
votes
0answers
33 views

Turn post into simple slideshow

I'm new to WordPress development, but I've coded a template page for a friend. I'm trying to convert the following html into a single post: <div class="container"> <div ...
0
votes
1answer
31 views

Loop not showing first post

I've set up the following loop on a page, but it is missing out the first post. Does anyone know why this might be? <div class="gallery"> <?php if (have_posts()) : while (have_posts()) : ...
2
votes
2answers
215 views

Auto Refresh Post List after X seconds

i'm new in wordpress, and i really need a help here. My main site, list the resume (excrept) of all posts, with pagination. But when a user publish a new post, the only way to see it on the main page ...
0
votes
0answers
291 views

The Loop won't display page or post content

I can't get the page content to appear in my custom wordpress theme. I have an extremely simple version of The Loop, which should just display the title and the content of the current page or posts. ...
1
vote
1answer
162 views

IF statement in a do_shortcode

Is it possible to do a if statement in a do_shortcode? <?php echo do_shortcode("[table width='500'] " . if ( have_posts() ) : while ( have_posts() ) : ...
-4
votes
1answer
241 views

Display All Sticky Post Before Regular Post

I would like to display all of my sticky post and then regular post thereafter. I am new to WordPress and not sure how to do this. Any help would be greatly appreciated. --------- ...
0
votes
1answer
48 views

How to inject a post within a loop

I'm trying to inject a post while the loop is running. This post will be injected on a condition, so if(x == j){ //inject post here } I see this would seem easy to do, but i have a posts_per_page ...
0
votes
1answer
120 views

Multiple Loops Breaking Pages

I'm new to WordPress, and I'm having an issue with "The Loop." I have a sidebar on the left side of a page that's supposed to show recent posts from two categories. In the middle of the page, there ...
0
votes
1answer
132 views

How to fetch posts that are stored in the different table than (default) wp_posts?

What I need is altering default Wordpress posts-pooling mechanism so I can get posts from other tables in database, not just default wp_posts and wp_postmeta. How is that possible? I'm ready to ...