I thought I know how to add pagination to a custom loop and I've seen these questions and tutorials:        but for some reason it doesn't work at this time. I created myfile.php, named it to "My Page Template" and set that to be my front page in Admin Panel > Settings > Reading.  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;  $args = array(     'post_type' =&gt; array('my_custom_post_type'),     'paged' =&gt; $paged,     'posts_per_page' =&gt; 3,     'ignore_sticky_posts' =&gt; 1 );  $wp_query = new WP_Query( $args ); var_dump($wp_query); if($wp_query-&gt;have_posts()) :     while($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post();         // show post     endwhile; endif;  next_posts_link('Next posts');  wp_reset_query(); wp_reset_postdata();   What happens:   Front page shows 3 posts as expected. "Next posts" link is shown and points to  as expected. While I'm on  it shows the same set of posts and "Next posts" link points to  which is not what I want. var_dump($wp_query) shows public 'max_num_pages' =&gt; float 8. var_dump($wp_query) shows public 'found_posts' =&gt; string '24' (length=2). var_dump($wp_query) shows public 'is_paged' =&gt; boolean false. var_dump($wp_query) shows 'paged' =&gt; int 1 (when I'm on page number 2). When I'm renaming $wp_query to $my_custom_query then "Next posts" link doesn't show at all.   Is there anything else I should do here?  UPDATE: I managed to set proper $paged by changing $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; to $paged = (get_query_var('page')) ? get_query_var('page') : 1; but it still shows a wrong navigation link.
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?
Where can the last FSTrim be seen as successful or not? (log files) I recently installed an SSD and AFAIK Ubuntu makes a weekly FSTrim on SSD's that support it.  Is there a log file of this trims? Same gravatar is displayed for different users in the stackexchange.com , under the Top Network Askers in the right side bar.   The red circled image's source (&lt;img src=) are from   https://www.gravatar.com/avatar/?s=18&amp;d=identicon&amp;r=PG&amp;s=30                                ^   Seems the gravatar id is missing here in the image source.  For an example from the list, the user  gravatar id should be    https://www.gravatar.com/avatar/66c66c4d97a7bc3859a85253f003e1fb?s=18&amp;d=identicon&amp;r=PG&amp;s=30   but it is mapped with   https://www.gravatar.com/avatar/?s=18&amp;d=identicon&amp;r=PG&amp;s=30   which caused the display issue. Let $h$ the irreducible polynomial over $\Bbb F_2 = \{0, 1\}$  $$h  =  x^4 +x +1$$  Let $E=\Bbb F_2(\alpha)$, i.e. the field $\Bbb F_2$ extended with $\alpha$, where $\alpha$ is a root of $h$.   How do we determine the numbers of elements in the extension $E$? Can every non-zero element in the extension be expressed in the form $(\alpha)^n$ for some $n\in\Bbb N$ ? How do we find all the roots of $h$ over the extension $E$? If $f$ is continuous and $\,f\big(\frac{1}2(x+y)\big) \le \frac{1}{2}\big(\,f(x)+f(y)\big)$, then $f$ is convex Let $\,\,f :\mathbb R \to \mathbb R$ be a continuous function such that $$ f\Big(\dfrac{x+y}2\Big) \le \dfrac{1}{2}\big(\,f(x)+f(y)\big) ,\,\, \text{for all}\,\, x,y \in \mathbb R, $$ then  how do we prove that $f$ is convex that is $$ f\big(tx+(1-t)y\big)\le tf(x)+(1-t)f(y) , \forall x,y \in \mathbb R , t\in (0,1)? $$ I can prove it for dyadic rational's $t=\dfrac k {2^n}$ and then argue by continuity ; but I would like a more direct proof . Thanks in Advance Create an item in sharepoint calender when infopath form is submitted in sharepoint 2010 through workflow The 'ok' on the 'Your Answer' dialog on unregistered sites is a bit too high The 'ok' on the 'Your Answer' dialog on unregistered sites is a bit too high:     You can see the top of the k is outside the actual box, increasing the margin-top by 10px in the containing div fixes it. How do I add CSS files? Here is an example of my *.info file.      Why the page cannot load the CSS that I add myself? Why does the question's closed status disappear when clicking to load a new edit? How to shuffle all songs in iOS 8.4 music app In the old version of the music app you could shuffle all songs when songs were selected:      This feature seems to be absent in iOS 8.4 and the new music app:      What are the options for shuffling all my songs in the new version of the music app under iOS 8.4? Best way to strike out a text $$\lim_{n\to \infty}\frac1{2n}\log\left({2n \choose n}\right)$$  Now, $\log(n!) = \Theta (n\log(n))$ so I think we could write,   $$\lim_{n\to\infty}\frac{1}{2n}\left(\log\left(2n!\right) - \log\left(n!^2\right)\right) = \frac{1}{2n}\left(\log\left(2n!\right) - 2\log\left(n!\right)\right) $$  $$\lim_{n\to\infty}\frac{1}{2n}\left(2n\log\left(2n\right) - 2n\log\left(n\right)\right) $$  $$\log\left(2n\right) - \log\left(n\right) = \log(2)$$  Is this legitimate? I feel this might be wrong since, the $\Theta$ notation conceals a constant factor. I can't remember the gender of the main character.  I remember bits and pieces from different books, but I think they're all part of the same series. The pieces may not be in order or from multiple books.   Boy somehow ends up in a mirror universe that's darker and seems to have no people. He has to travel to a certain office(?) building and steal a book. I think this is towards the end of the book (I can't remember the events leading up to it). I think he finds the portal in a forest or something behind his school. He goes into the ocean with mermaids or something and has to save the ocean from pollution. Aliens exist and are observing Earth, because they think it's undeveloped and are waiting for them to be advanced enough. His mother ends up in hospital and he does something to save her. He goes to Ireland(?) and enters a mountain or something to find a race of people. I can't remember who showed him how, but I'm pretty sure she used magic. He goes to Mars and saves a race from war with themselves(?). This place was hidden inside an illusion. He's also grouped with a linguist that learned their language. He travels to another world where there's a prince. I can't remember, but I think it might've been part of a tournament. His sister goes to a robot planet through a portal. I think the actual planet was a robot/AI and had lots of little robots on it. Can't remember what happens here, but he goes there and saves her from something.   It was set a few years ago, when computers weren't common (his family got one early in the first book, I think).  Thanks in advance if someone finds it. How to create Motion Trail in Cycles I want to create a motion trail effect for a sword like known in games look at that example if you have an solution that looks not as fancy as in the picture don't mind to post it. I'll accept anything useful. The definition of span So basically , we all know the direction outside the magnet its from NORTH to SOUTH. but what i don't understand is that what is the direction inside is it the same ?? Obtaining knowledge from a random forest Random forests are considered to be black boxes, but recently I was thinking what knowledge can be obtained from a random forest?  The most obvious thing is the importance of the variables, in the simplest variant it can be done just by calculating the number of occurrences of a variable. The second thing I was thinking about are interactions. I think that if the number of trees is sufficiently large then the number of occurrences of pairs of variables can be tested (something like chi square independence).  The third thing are nonlinearities of variables. My first idea was just to look at a chart of a variable  Vs score, but I'm not sure yet whether it makes any sense.    Added 23.01.2012 Motivation    I want to use this knowledge to improve a logit model. I think (or at least I hope) that it is possible to find interactions and nonlinearities that were overlooked. How to determine surprise when only part of a side is stealthy? Is it possible to use multiple desktop environments on same system? One Object won't Show up in Final Render even though it shows up in the Preview Render I know that matrix multiplication in general is not commutative. So, in general:  $A, B \in \mathbb{R}^{n \times n}: A \cdot B \neq B \cdot A$  But for some matrices, this equations holds, e.g. A = Identity or A = Null-matrix $\forall B \in \mathbb{R}^{n \times n}$.  I think I remember that a group of special matrices (was it $O(n)$, the ?) exist, for which matrix multiplication is commutative.  For which matrices $A, B \in \mathbb{R}^{n \times n}$ is $A\cdot B = B \cdot A$?