0
votes
1answer
30 views

How To Pick “full/thumbnail” Image In A WordPress Loop?

I am picking WordPress latest post through WordPress post loop for that I am using the below code but in this its picking all images at full size. <?php if ( have_posts() ) : ?> <?php while ...
1
vote
1answer
24 views

Inserting custom data to the_post() during loop

I have some posts on my WordPress site, and let's say I want to add a random number for each post with $num as key and random() as value. Then I want to access them with something like: $post->num ...
3
votes
3answers
120 views

Skip post in loop and mixin later

In the blog, i try to avoid to show two posts from the same category in succession. So if the latest two posts are from category 1, i want to skip the second one, take post 3 first (if it's not from ...
0
votes
1answer
30 views

Loop doesn't display posts. It displays a link to the home page instead

I’m building a WP theme using Bootstrap. Aparently, all templates were working fine until I tried to display a list of recent post on the front page. Basically, the loop it’s not displaying posts (it ...
0
votes
1answer
98 views

Custom taxonomy archive page problem

My website is built on custom post types, that I have organized with different custom taxonomies. The menu buttons are the taxonomies archive pages (red, blue, green), so that when you click on the ...
-2
votes
2answers
74 views

CSS code for “inserting a custom post divider” after each post

I want to add a custom post divider to separate my posts. I'm using the Enfold theme in WordPress.org. I've searched for the answer to my question but I don't understand the coding language. I ...
0
votes
1answer
38 views

Show related posts based of current ACF field name in a single page post (a loop within loop)

I have a single page where I display my current post. Within the post loop, I wanna display another loop inside that shows 3 other related posts by title that share the same text as the current post ...
0
votes
0answers
16 views

Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?

I have the following problem with featured tag posts I have a page of a website in wich I want to show only the posts that have setted a specific tag (using the loop). So in this page I have put ...
0
votes
1answer
110 views

Only display sticky post or latest post in custom loop

I'm new to Wordpress and PHP and I've been battling with this for a while now. What I have for the moment is 2 loops. I want to first loop to only ever show 1 post: either a sticky post, or the ...
0
votes
0answers
46 views

Why doesn't my WordPress page show the most recent post?

I was wondering if someone could help me with the following. My news page on my WordPress website doesn't show the most recent blog post, which I want it to do. The code I have is: ...
0
votes
2answers
17 views

If Specific Post, Link Elsewhere

I would like to create a conditional statement that checks the loop for a specific post ID, then if true, it outputs a link elsewhere. This is what I have so far: <?php ...
6
votes
1answer
154 views

Inject post (from specific category) between posts in Loop

I would like to add a post (from specific category) between posts in the WordPress Loop (such as 'Sponsors'). Example: P P P S P P S P P S P P How can I achieve this? I am a beginner with coding, so ...
0
votes
0answers
27 views

How to show the posts list into a static page? Problems to use the loop into a static page

I have the following problem: I have to create a posts archive into a static page. So I have created this page template containing the loop to interate on my posts: <?php /** * Template Name: ...
0
votes
1answer
39 views

Some doubts about how the loop work (trying debugging it)

I am very new in WordPress development (and also in PHP development, I came from Java and C#). Today I have installed Aptana and configured XDebug to inspect what happens into the TwentyTwelve theme. ...
1
vote
0answers
50 views

Divide Loop Into Days & Categories

If you could help, I'd greatly appreciate it, because I'm halfway there, but I'm currently stuck! The site I'm working on needs to have it's posts, within the loop, divided up by days, and then under ...
0
votes
2answers
91 views

How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?

I am pretty new in WordPress theme development and I have the following doubt about how show posts into a page. I have this page belonging to an old custom legacy blog that I am build again using ...
0
votes
1answer
30 views

What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?

I am pretty new in WordPress theme development and I have the following doubt. I am working on this custom theme: http://lnx.asper-eritrea.com/ Into this website upper horizontal main menu I have a ...
0
votes
1answer
77 views

Keep post format class with isotope filter

When I add isotope filtering for displaying posts, I lose the format class. WITHOUT isotope filtering: <article id="post-22" class="post-22 post type-post status-publish format-image hentry ...
0
votes
1answer
62 views

Automatically create a loop for post ID

I am having trouble generating a loop for my post. The JS calls the slide_ID which then needs to display each slide-ID in numeric order for it to work. Example for slide-1 to scroll to its next slide ...
0
votes
2answers
75 views

Custom WP_Query not working correctly

OK, So I have created a custom WP_Query that gets the post_type post and outputs it as a styled list. It works well and outputs the styled list but then underneath it displays all the posts again but ...
0
votes
1answer
110 views

Different number of posts per row in grid layout

Is there a way to return different number of posts per row in grid layout based on the post size retrieved from a custom field? For example: | Large post | | Medium ...
0
votes
1answer
60 views

How to create content automatically when a post is published?

Goal: Ability to automatically create content in WordPress posts/pages. Goal Details: When a post is created/published, it will automatically create or configure content based on the base data inputs ...
0
votes
1answer
21 views

Grab next post title in archive page

I am using a custom query on a page to display single posts from a specific category, one post per page. Here is my current query: $results = new WP_Query( array( 'post_type' => 'post', ...
0
votes
1answer
151 views

How to show related posts by category or custom post type?

I'm looking for the best way to go about creating, probably, custom post type where you can filter in the categories related to that custom post type in the sidebar. Here is the website I'm working ...
0
votes
0answers
116 views

Filter Wordpress post Dynamically on dropdown selection?

Want to filter Wordpress post Dynamically on dropdown selection? But am not able to find out any solution how it can be done.Any help appreciated. Thanks On Clicking On Latest to Old the post ...
0
votes
3answers
260 views

Display content from a specific category

I'm trying to get my news page to display content from one category only (number 3) but I cant seem to get it to work. Instead of just displaying posts from category 3 it displays posts from all ...
0
votes
1answer
73 views

Optimize CPT-function with a loop

I want to optimize my functions of a Custom Post Type (CPT). Now I have 10 meta boxes. For each box I have an extra function. The aim is to produce the 10 boxes in one function. I already tried the ...
0
votes
0answers
377 views

Where should get_post_meta() go to get $post->ID get_post_meta() is empty and $post->ID & get_the_id() are working

EDIT: So I added the full code. What I'm trying to attempt is to get the post id into the metabox values for a publish immediate and scheduled post. It appears that I'm having trouble passing the id ...
-1
votes
1answer
717 views

How to Display Post View Count

I am trying to display post view counts. I've tried below function to display the post view count, but I'm getting same post view for all the post in loop. Not getting correct post view count. ...
0
votes
1answer
96 views

Adding specific post category between posts in loop

I'm building a site built on a masonry theme and would like to add a specific category of post ('Sponsors' in this case) after every 3rd post. An example would go: Post Post Post Sponsor Post ...
-3
votes
2answers
48 views

What function does the loop of displaying posts?

What is the function that does the echoing of posts like post title in h1 and then the post body and then the author name. I hope everyone understood what I'm trying to say else please ask in comments ...
0
votes
1answer
227 views

Display post category in foreach loop with category link

I have the following code to show current author post lists with post thumbnail, post title, post date and post category. function my_get_display_author_posts() { global $authordata, $post; ...
-1
votes
1answer
191 views

Excerpt all post content Content Same Size without word cutting off

On my category page there are list of 24 posts with title and excerpt content. To display specific lengths of content, I am using substr function. Now the issue is that each post excerpt content are ...
0
votes
1answer
52 views

The loop does not show users

I'm trying to show all post made ​​by the author. Code author.php <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if( get_post_type() == 'post' ) {?> <?php ...
0
votes
1answer
35 views

How to use extract shortcode in loop?

Actually I need to gallery in any new post so i use shortcode for making gallery for every new post. I use images and videos in slider. problem is that I have custom html slider need to convert ...
1
vote
0answers
22 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
29 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
37 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
172 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
139 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
841 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
177 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
33 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
210 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
26 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
78 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
33 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
96 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
140 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
80 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> ...