Any tips on fitting pagination into my loop below and I owe you a beer or two. I've worked out how to pull the top rated articles by vote from a custom plugin, and lay it out with a count, but pagination has me stumped. I'm a self-taught learner here so any help would be greatly appreciated.  I was aiming for 6 posts shown per page then use pagination if needed.  Two posts are shown and after that a new code section is inserted with a count, the count works, everything works except pagination.  Not sure how this fits in  '$wp_query-&gt;query('showposts=6'.'&amp;paged='.$paged);    when I already use  DESC LIMIT 6 OFFSET 0   in my query...  &lt;?php global $wpdb; $query_sql = "SELECT like_pid FROM " . $wpdb-&gt;prefix ."likes_count ORDER BY like_count DESC LIMIT 6 OFFSET 0"; $query_result = $wpdb-&gt;get_col( $wpdb-&gt;prepare ($query_sql, OBJECT)); if ($query_result) { foreach ($query_result as $post_id) { $post = &amp;get_post( $post_id ); setup_postdata($post); ?&gt;  &lt;?php $count++; if ($count%2== 0) : ?&gt;  &lt;-- do the loop, count out two articles --&gt;  &lt;?php else : ?&gt;  &lt;-- do something after every two articles --&gt;  &lt;?php endif;?&gt;  &lt;?php } ?&gt; &lt;?php } ?&gt; //ugly but works  &lt;div class="next"&gt; &lt;?php next_posts_link('&amp;raquo;' ,0); ?&gt;&lt;/div&gt; &lt;div class="previous"&gt; &lt;?php previous_posts_link('&amp;laquo;' ,0); ?&gt;&lt;/div&gt;
I have added a custom/secondary query to a template file/custom page template; how can I make WordPress use my custom query for pagination, instead of using the main query loop's pagination?  Addendum  I have modified the main loop query via . Why isn't pagination working, and how do I fix it?
How does a graduate program's admissions committee operate? How does a typical graduate program's admissions committee operate? (In the US --- I understand that in Europe admissions are often structured differently.)  My mental model at the moment is several professors sitting in a conference room with a stack of printed applications and a few piles: accept, maybe, and reject. Three or so professors will read an application and then make a decision. If the volume of applications is large enough, multiple meetings might be required. This is purely my imagination --- I don't know how accurate this model is.  Of course, I'm sure that how admissions are handled depends greatly on the school, program, and department. I'm interested in a few data points to get a rough idea of what the average is.  A few more specific related questions:   How much time does a typical committee spend on each application? I suspect there's a distribution. Obviously unqualified applicants will probably have their applications tossed into the reject pile pretty quickly. Qualified applicants' applications might receive more attention. Do admissions committees look online for more information about an applicant? I've read some professors (in CS --- not my field) will look at a student's research/project website, but I have no idea how common this is. php - insert a variable in an echo string What do you call a person who does/thinks the opposite of the crowd for just that reason? Calculating the longest distance within polygon in QGIS I want to calculate the "diameter" of polygons in QGIS.  The "diameter" defined as the distance between the two most distant points of the polygon.  I couldn't find a fitting solution in the field calculator. Maybe you have some ideas? How can one differentiate between "who" and "whom"? Changing units of measurement in a simple regression model How can I search the bash history and rerun a command? Can I search history in bash and run the result? Remap Caps Lock to Ctrl-b Who is this running kid wearing a shirt with Uchiha symbol? There's a kid wearing a shirt with Uchiha symbol, but I have no idea who s/he is.    Who is this kid? This one has me kind of stumped. I want to make the first word of all the paragraphs in my #content div at 14pt instead of the default for the paragraphs (12pt). Is there a way to do this in straight CSS or am I left wrapping the first word in a span to accomplish this? Why is Facebook PHP SDK getUser always returning 0? I ran into the "mysterious"  \pdfendlink ended up in different nesting level than \pdfstartlink   error.  According to , "this happens when hyperref is used under pdftex and a citation splits across a page boundary".  The given solution is to manual fix the citation to not split across the page boundary.  However, this workaround isn't feasible for me, as the documents are automatically generated on a server with no user interaction.  Is there any solution to the problem known, perhaps an experimental hyperref action or a patch to pdftex?  (Probably, one could use luatex to solve the problem, but for other reasons, luatex is not an option in this project.)  MWE:  \documentclass[%draft               ]{article} \usepackage{hyperref} \setlength{\textwidth}{3cm} \setlength{\textheight}{3cm}  \begin{document} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna \href{http://www.tug.org/errors}{aliquyam erat, sed diam voluptua.} \end{document} sed substitution with Bash variables Is it true that for each set $M$ a given injective function $f: M \rightarrow M$ is surjective, too?  Can someone explain why it is true or not and give an example? Can you concentrate on a special ability while also concentrating on a spell? There exist several abilities that have the text similar to, this effect lasts while you maintain concentration (as if you were concentrating on a spell). One such example is the Bard College of Glamour: Mantle of Majesty ability.     At 6th level, you gain the ability to cloak yourself in a fey magic   that makes others want to serve you. As a bonus action, you cast   command, without expending a spell slot, and you take on an appearance   of unearthly beauty for 1 minute or until your concentration ends (as   if you were concentrating on a spell). During this time, you can cast   command as a bonus action on each of your turns, without expending a   spell slot.   Another example is the Cleric Trickery Domain: Channel Divinity: Invoke Duplicity ability.     Starting at 2nd level, you can use your Channel Divinity to create an   illusory duplicate of yourself.      As an action, you create a perfect illusion of yourself that lasts for   1 minute, or until you lose your concentration (as if you were   concentrating on a spell).   While you are concentrating on maintaining such an ability would you also be able to maintain concentration on a spell that requires concentration?  There does not seem to be any RAW that limits this however the limitation around concentrating on a second spell exists which may suggest that the intent is that a character cannot concentrate on 2 effects at the same time unless explicitly stated. Is there a way to set transparency of windows in GNOME? I have a qualifying exam coming up in a couple days and I am just trying to understand some pathological examples I have in my notes. I will list a similar problem which I know the solution to and then the question.  True or False:   let $A,B \in \mathbb{Q}^{n \times n }$  Suppose $xI-A$ and $xI-B$ are equivalent then $\det(xI-A) = \det(xI-B)$.     I wrote in my notes this is true because any two matrices are equivalent in $\mathbb{Q[x]}^{n \times n}$ if and only if they have the same invariant factors.  Since the characteristic polynomial is a product of the invariant factors it follows that $\det(xI-A) = \det(xI-B)$.        True or False:   let $A,B \in \mathbb{Q}^{n \times n }$. If $\det(xI-A) = \det(xI-B)$ (in $\mathbb{Q}[x]$) then $xI-A$ and $xI-B$ are equivalent  in $\mathbb{Q}[x]^{n \times n}$   I think this is false because of the fact that equality of determinants is not strong enough to guarantee all invariant factors are equal but I do not have an example. Does "the same number of people" behave as singular or plural? In the  library, they are overloading the () operator.  Is this a convention in C++? For callbacks, etc.?  I have seen this in code of a co-worker (who happens to be a big Boost fan). Of all the Boost goodness out there, this has only led to confusion for me.  Any insight as to the reason for this overload? Browsing Questions shows the same questions on different pages I have just been looking through the questions to answer those that I can and as I go to the next page (using the Next button at the bottom) I am presented with the same questions.  I imagine this is not a flaw and in fact questions are coming in fast filling up a page pushing my current page to the next one.  An idea to solve would be to set a variable for starting id when I start paging and only clicking an update button will reset the starting id.