0
votes
0answers
14 views

Link to post meta page (like WordPress does for categories)

I've got a few different categories, and each has it's own page. And obviously WordPress automatically links to the category template page: category.php. However, is it possible to do this with ...
0
votes
1answer
43 views

Writing less unnecessary code with WordPress

I've got a simple homepage, that pulls content for 4 different categories. To do this, I'm writing 4 different WP_Query, and only the category name is changing (and as a result, the WP_Query name, ...
0
votes
1answer
20 views

Remember the meta value with radio buttons

I've created a simple meta box consisting of two radio buttons: yes or no. When they click on the appropriate box, it saves the meta value to the database. However, the post page does not remember it ...
0
votes
1answer
38 views

Retrieve WordPress' the_content() with jQuery

I'm trying to load some additional images when the user clicks a button. At the moment, I have the following function: $('a').click(function(){ $( ".gallery-pop-up-container" ) .load( ...
1
vote
1answer
26 views

Echo all category names, apart from one

I've got this simple code, that creates breadcrumbs: function the_breadcrumb() { if (!is_home()) { echo '<a href="'; echo get_option('home'); echo '">'; echo ...
1
vote
1answer
45 views

Get 10 posts from a WP_Query. If less than 10, get the remainder from elsewhere

I'm trying to create a related posts WP_Query. So far, I've to created a custom WP_Query that queries all posts that match an array of tags. However, I'm trying to create a simple if statement: if ...
0
votes
3answers
29 views

Exclude subcategory from wp_query

I've got a simple loop, that goes through the category street-style: $street_style_tags = array( 'category_name' => 'street-style', 'posts_per_page' => 25, 'post_type' => 'post', ...
0
votes
1answer
28 views

Loop through all posts, show attachment if there

I've created two simple foreach loops: one for all posts, one for all attachments. I want it show every post title, and if there is an attachment, show that attachment. I have, thus far: ...
0
votes
1answer
31 views

Style first 3 posts differently with WP_Query [duplicate]

I've got the following code, which gets the first 3 posts. However, I am hoping to style each differently with if statements. But when I add if statements (to determine whether it is the first or ...
0
votes
1answer
20 views

filter a loop base on specific category

i am going to filter my loop base on the category the problem is that when i am using the following code it display all my post. // Query args $custom_cat_args = array( 'posts_per_page' => 15, ...
1
vote
1answer
27 views

First post of each category

I'm trying to create a simple loop, that gets the latest post of 3 selected categories. I've searched for something similar to learn from, but most are overly complex. At the moment, I have: ...
0
votes
1answer
46 views

problem with using serveral loop in wordpress theme

i am using several loops like this <?php $posts = get_posts('numberposts=1&order=DESC&orderby=post_date&category='.get_cat_ID( 'سیاست' )); foreach ($posts as $post) : ...
0
votes
1answer
32 views

Change image size depending on page

I've got a simple photographic site and it uses large image sizes throughout. On the archive page, however, I've got about 35 posts each showing the first image of each. By default, the images being ...
0
votes
1answer
26 views

Why in my theme I can't see all the statics content under the posts?

I am pretty new in PHP and I have the following problem, I am developing this WordPress problem: http://onofri.org/WP_BootStrap/ As you can see it is shown the unique post present on my blog (the one ...
1
vote
3answers
59 views

Some doubts about how to show posts in a custom theme?

I am pretty new in WordPress theme development and I have some doubt about this WP function used to show my post in the homepage: <?php if ( have_posts() ) : // Start the ...
0
votes
1answer
38 views

posts_nav_link(); not showing up on static pages

I've got two different loops. The default on the homepage, but a secondary loop on the archive page. It grabs all the content, like so: <?php // WP_Query arguments $args = array ( ...
0
votes
0answers
12 views

How do I create pagination? [duplicate]

I've got a site with a static front page and another page for posts. On the posts page I'm using paginate_links() to generate pagination. However, it isn't producing output. Dumping the output as a ...
0
votes
0answers
44 views

How to get multiple loop in category.php, my scripts becomes madness

I am trying to develop a category.php page for my new theme and the loop which I’ve developed shows all posts of my blog and really bad too. I'm not an expert in WordPress theme development and ...
1
vote
1answer
57 views

Grab the first paragraph of each post

I have some code that uses preg_match to grab the first paragraph, and then spit it out in the loop: function first_paragraph() { global $post, $posts; $first_para = ''; ob_start(); ...
0
votes
1answer
43 views

WP_Query not getting all posts, just tagged posts

I'm trying to create an archive page that grabs every post submitted. At the moment, I have this, which doesn't work: <?php $args = array (); $query = new WP_Query( $args ); if ( ...
0
votes
0answers
40 views

Suppress the_content filter in a nested loop

I have some layout changes that are being applied to the_content. I need to do one of two things, but neither is working as expected... either: Pass data to the filter so that it knows if it is a ...
0
votes
2answers
73 views

how to get the post attachement image in full size?

Hi i am using the normal loop to get the post content. Objective is to show images or videos in the blog. I tried the_content() for the loop but am getting the thumbnail image i belive, What i want ...
0
votes
3answers
232 views

How can I loop into two different DIVS without repeating the DIVs

I am having a little trouble trying to figure out how I can accomplish this: I have a container with two colums in it, a right and a left column. Each column will have 3 posts with a short excerpt ...
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
0answers
89 views

How to Display Custom Post Type's Gallery (images ) in Through WP_Query

I am trying to load an Image Slider images from a Custom Post Type image Gallery Feature. For example let say I have an Custom Post Type called banner which I can load images to it's Gallery and I ...
0
votes
1answer
22 views

Tags interfering with next_post_link();

I am creating a theme in WordPress. I am using query_posts('tag=front') to limit the posts on the front page. However, I want to let the user navigate through all posts, regardless of tags when on ...
0
votes
2answers
144 views

Two column layout with alphabetical ordering

I am trying to output a list of stockists in two columns from left to right, sorted alphabetically: A | B C | D E | F G | H Currently, the code below is sorting half the posts alphabeticly and ...
0
votes
2answers
50 views

Get the amount of posts on a given page

When you go to something like: site.com/?cat=2&page=2 you might see 3 posts, the page before might have 5 posts. I am looking for a way to count the posts on a given page. so if I am on page 2, ...
0
votes
0answers
288 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. ...
0
votes
0answers
44 views

Simple loop with shortcode rendering problem

The following loop is in a single.php template file. It works ok, but the shortcodes aren't rendered. the loop: <div id="circula-destaque"> <?php if(have_posts()): while(have_posts()): ...
0
votes
1answer
55 views

Create custom post order (with custom post type meta)

I would like to display my custom post type by specific order. In my custom post type, i've 2 meta : - DAY ( Select : 1,2,3,4,5,etc...) - MONTH ( Select : Janvier, Fevrier, Mars, Avril, etc...) ...
0
votes
1answer
86 views

How get the 10 most viewed pages (not post)

I would like to know how it's possible to get the 10 most viewed pages ? I know how make it with post, but not with page... Thanks for your help.
0
votes
1answer
61 views

Change loop order via form or link (jquery, not URL)

I would like to change the loop order via a link or form input, but it can`t load via URL, because i need to orderby=meta-value and this cannot be done via url args (acording the codex) , only like ...
0
votes
1answer
29 views

first excerpt fine, subsequent post excerpts shift to the right instead of displaying vertically [closed]

The front page of the blog is intended to show post excerpts and a cropped version of the post image. The first/most recent excerpt is perfect, however the older subsequent excerpts are showing up ...
0
votes
1answer
233 views

Pagination and multiple loops

Right, so what I currently have is a page split into three using a css grid. The third column is the sidebar, The first two each have a query for posts to display, and create a nice grid of posts ...
-1
votes
1answer
37 views

query posts in wordpress

I want to filter my query results just before the_loop starts in word press. I only want the results having term_id or term_taxonomy_id equal to 1. ...
0
votes
1answer
25 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() ...
1
vote
3answers
160 views

Force index.php have_posts() loop to exit if no sticky posts found

I'm currently using the code below to list sticky posts on my index.php. However, when no sticky posts are present, its loading the latest posts (up to the number specified in "settings > reading > ...
0
votes
1answer
55 views

How to close open divs in post loop

I want to add some additional HTML markup to specific posts in a loop. For example in the post loop, I want to wrap the post 3, 4, 5 in two divs .extra and .extra2 I want to display post in following ...
0
votes
1answer
58 views

The normal loop with different styles doesn't work in search.php

This code in the search.php file does not work: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if( get_post_type() == 'post' ) {?> <div id="post"> ...
0
votes
2answers
33 views

Checking conditionals

We all know about the default WordPress post types, these being aside, gallery, status, chat and so on. any good theme should support all of them. In the case where a theme does support all of them, ...
0
votes
1answer
727 views

How to retrieve an image from a post and display it before excerpt of a post? [duplicate]

I'm customizing a WordPress template and I would implement the following behavior in the excerpt posts visualization in my homepage: If a post contains images (one or more), in the homepage post ...
1
vote
2answers
110 views

Why is the first query affecting the second query, even after wp_reset_query() and wp_reset_postdata(), but not on the second page?

I am literally clueless as to why the code does not function properly on the first page, but functions as expected on the second page. I have already tried running the second query via another ...
4
votes
1answer
58 views

Why doesn't /2013/01/ properly return January's archives in archive.php?

I've figured out how to implement pagination into WordPress archives, etc.., but the content isn't being returned correctly. Instead of /2013/01/ returning January 2013's archives, it instead returns ...
2
votes
2answers
68 views

Why does this loop only work on the homepage?

I've been trying to figure this out all day now. Consider the following code below: <div class="slider"> <div class="slides"><?php wp_reset_query(); ...
5
votes
3answers
512 views

Get 'page' number with infinite scroll

I added infinite scroll support of the Jetpack plugin to my own theme using this tutorial: add_theme_support( 'infinite-scroll', array( 'container' => 'content', 'footer' => false, ...
0
votes
3answers
68 views

Trying to display ads on only a third of posts in a loop. Keep getting Error 500?

I'm thinking it's just a PHP code error, but for some reason the following code won't work, it just keeps giving me Internal Server Error 500 <?php $ajfl_adLuck = rand(1,3); if ($ajfl_adLuck ...
-3
votes
1answer
64 views

$_html is empty when var dumped

So I have run across a bizzar issue, in which I know is working as i expect it to in terms of the array values, yet the _html variable returns something like string(29) " " which to my knowledge ...
0
votes
2answers
197 views

Polldaddy doesn't show up on own theme

I'm developing my own theme on a website where I use the polldaddy polls & ratings plugin. I've set the ratings to show up on the homepage and that's working with e.g. the twentytwelve theme. ...
-2
votes
1answer
84 views

Pagination not working properly

I have a list of posts from a category as seen here in this example. The problem is, if you scroll down to the bottom and click older, you'll see that the posts on the page have not changed at all, ...