I have a page to show my product, now i want to load further posts using "infinite scroll".
122964
How do I enable infinite scroll (either with the infinite-scroll plugin OR the built in infinite scroll jetpack) on the "Thoughts" Wordpress theme?  I'm a total noob at editing this stuff so if you are kind enough to help please keep it very simple as if I do not know anything.
41492
I'm trying to add some function to each loop called in the themes. What I'm doing is I add a function to count post view from here , to use the function I need to add this line &lt;?php setPostViews(get_the_ID()); ?&gt; to single.php, page.php, etc.  I want to know whether I can use some hook to automatically add the &lt;?php setPostViews(get_the_ID()); ?&gt; line without hard code it for each single.php, page.php files.
64728
I have a loop where I display all posts on the site, the problem is that the_excerpt is not being displayed. What am I doing wrong?    &lt;?php      $all_posts = get_posts(array('numberposts' =&gt; -1));     $total_posts = count($all_posts);     $posts_per_column = intval($total_posts / 3);     $count = 0;     $col = 1;     foreach($all_posts as $post):   ?&gt;    &lt;!--post--&gt;   &lt;div class='post' id='article&lt;?php echo $count; ?&gt;'&gt;     &lt;div class='thumb'&gt;        &lt;a href='&lt;?php the_permalink() ?&gt;'&gt;       &lt;!--todo: round thumb images and make them of variable height--&gt;       &lt;?php the_post_thumbnail() ?&gt;       &lt;?php          $cat = get_the_category();          $cat_long = $cat[0]-&gt;cat_name;         $cat_split = explode(' ', $cat_long);          $cat_short = strtolower($cat_split[0]);       ?&gt;       &lt;/a&gt;       &lt;span class='tag &lt;?php echo $cat_short ?&gt;'&gt;&lt;?php echo $cat_long ?&gt;&lt;/span&gt;     &lt;/div&gt;      &lt;div class='inner &lt;?php echo $cat_short ?&gt;'&gt;       &lt;h2 class='entry-title'&gt;&lt;a href='&lt;?php the_permalink() ?&gt;'&gt;&lt;?php the_title() ?&gt;&lt;/a&gt;&lt;/h2&gt;     &lt;/div&gt;     &lt;div class='entry-content'&gt;       &lt;?php the_excerpt() ?&gt;     &lt;/div&gt;   &lt;/div&gt;   &lt;!--end post--&gt;
31847
Sometimes I need to upload, embed, or display inline an image in a question or answer. How can I do that?
115727
If a question has more than one page of answers then a new answer is not likely to get much attention.  I think the stackoverflow engine should give some more weight to newer answers to old questions but I'm not sure how.  Maybe a tweaked UI to get access to newer answers.  NB. In the related questions this  popped up, I hadnt realised either that these tools existed.
39560
I'd love a scrollable widget that displayed the feed, possibly customising what was shown (i.e. hot questions, unanswered, rep changes, badge notifications etc.) globally or per-site.  Ideally each entry would be clickable in the widget, opening up the SE app to the relevant screen.
26196
Let's have some fun shall we??  At the bottom of the content for about 1/3rd of my pages, but not in the footer, I create an internal link for each related IP address to the page on my site for that IP address. This was fine 6 months ago, but now that my database has grown so large, I discovered that it was not uncommon to create 700+ links within this section with one page having 2600. Ooopppsss!! ;-) Houston, we have a problem!  Now this is easy enough to fix. For right now, I put a limit 100 on the query. But this got me thinking and searching for a definitive answer. So far... no luck.  Please understand I do fully know the effects regarding SEO. Most of you know that already. I am not looking for a lesson- just an idea of a range.  Q: How many internal links per page is too many?  There are a lot of answers on the net culled from various nether regions and I have a number in mind (also culled), but I was thinking that there has to be an authoritative answer somewhere. Google says reasonable and MOZ's answer seemed to very arbitrary to me. Some so-called SEO experts say as little as 6 and as much as 200. Yeah. That is useful! One said there is no limit. I know there is a semi-flexible practical limit. I remember reading about this years ago, but cannot remember the mechanics behind it right now. I would have to think on this for a while.  Bonus Q: If given a choice of creating links from a random query (and yes I can do this) or first 100 or so (using limit), which would you prefer/advise and why? Again, I have an idea in mind (again, culled). Is there anything definitive in this regard as well?  My primary concerns are UX, download speed, and lastly, Giigle. (&lt;= please do not edit to change)
110982
I have a list of items which is fetched from an REST API and displayed in a page 10 at a time. These items are not stored in Drupal database in any way. I managed to have a basic pager which is just a Previous &amp; Next. But as per design the list should have a full pager.  So, how can I add a Full Pager in such page?
120620
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 stacked in it. Ideally I would like to add one into the right and one into the left until it reaches 3 rows of posts(although if that proves to be alot more of a difficult task than I am fine with posting to the first column than the second. I am able to loop through the posts and add them to one column, but I am having trouble figuring out how one will loop into two separate divs, without repeating the divs. Here is how I am attempting it, so far this code will loop into the left column.  The first left side is using the loop to display the title(excerpt will come after) and the right side is just using html. Can anyone help me figure this one out?         &lt;h2&gt;Popular posts&lt;/h2&gt;        &lt;h3&gt;Showing the most popular posts.&lt;/h3&gt;  &lt;div class="col4 inner-left"&gt;        &lt;ul class="popular-list"&gt;    &lt;?php        query_posts('meta_key=post_views_count&amp;orderby=meta_value_num&amp;order=DESC&amp;posts_per_page=10&amp;post_type=pop');        if (have_posts()) : while (have_posts()) : the_post(); ?&gt;             &lt;li&gt;              &lt;a href=&lt;?php the_permalink(); ?&gt;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;              &lt;p&gt;Popular post. This is a popular post, it really is.&lt;/p&gt;             &lt;/li&gt;    &lt;?php        endwhile; endif;        wp_reset_query();     ?&gt;                   &lt;/ul&gt;     &lt;/div&gt;  &lt;div class="col4 inner-right"&gt;         &lt;ul class="popular-list"&gt;             &lt;li&gt;               &lt;a href="popularpostlink.php"&gt;This is a popular post&lt;/a&gt;               &lt;p&gt;Popular post. This is a popular post, it really is.&lt;/p&gt;             &lt;/li&gt;                  &lt;li&gt;                   &lt;a href="popularpostlink.php"&gt;This is a popular post&lt;/a&gt;                   &lt;p&gt;Popular post. This is a popular post, it really is.&lt;/p&gt;                 &lt;/li&gt;             &lt;/ul&gt;         &lt;/div&gt;
113770
How can I display most viewed post or most commented post as slider on my front page?
107747
Please bear with me because I am new to utilizing Wordpress PHP this way. I have the following script:  &lt;div id="content"&gt; &lt;?php     // check if the repeater field has rows of data     if( have_rows('repeat_field') ):         $i = 0;          // loop through the rows of data         while ( have_rows('repeat_field') ) : the_row();             $i++;              // display a sub field value             if (!empty(get_sub_field('feature_image_post'))) {                  echo '&lt;a href="';                 the_sub_field('restaurant_article_link');                  echo '"&gt;';             }              if( $i &gt;= 78 ) {                 break;             }                     endwhile;     else :         // no rows found     endif;     ?&gt;     &lt;/div&gt;     &lt;div id="loading-image" style="display: none;"&gt;&lt;/div&gt;     &lt;div id="part2"&gt;&lt;/div&gt;     &lt;script&gt;          var w = $(window);         window.onscroll = function(ev) {             if ($(document).height() - w.height() == w.scrollTop()) {                  $('#loading-image').show();                 $.ajax({                     url: "&lt;?php echo get_stylesheet_directory_uri();?&gt;/post-2.php",                     cache: false,                     success: function(result){                       $("#part2").html(result);                     },                     complete: function(){                       $('#loading-image').hide();                     }                 });             }         };     &lt;/script&gt;   The the Php page that I am trying to load pretty much contains the same code . It just stops after loading 200 fields.   &lt;?php     // check if the repeater field has rows of data     if( have_rows('repeat_field') ):         $i = 0;         // loop through the rows of data         while ( have_rows('repeat_field') ) : the_row();             $i++;             // display a sub field value             if (!empty(get_sub_field('feature_image_post'))) {                 echo '&lt;a href="';                 the_sub_field('restaurant_article_link');                  echo '"&gt;';             }              if( $i &gt;= 200 ){               break;             }                      endwhile;     else :         // no rows found     endif; ?&gt;   I don't know why the php page (post-2.php) is not loading. The strange thing is that when I replace &lt;?php echo get_stylesheet_directory_uri();?&gt;/post-2.php with a test html page &lt;?php echo get_stylesheet_directory_uri();?&gt;/test.html The test page (test.html) loads.  I have to say that I looked on in my console using the console tab of my browser added console.log(); to view any errors and I'm not getting any errors. I also looked in my networked tag to ensure that post-2.php loaded properly and I'm not getting errors. My goal is to find out why my PHP page isn't loading  ***** Update ***** I'm being told to use $post_id but I've never used it. Does anyone have a working example of this? Would it be similar to if( have_rows('repeat_field', $post_id) ): or if( have_rows('repeat_field', 55612) ): ?
26936
I have a responsive blog where ads are displayed in the sidebar. On mobile devices however, the sidebar is pushed to the bottom below the posts.   So what I'd like to do is move the ads from the sidebar and insert them into the post itself on mobile devices   I do this using javascript:  &lt;div id="main"&gt;     &lt;div id="article"&gt;         &lt;div class="post"&gt;             &lt;p class="intro"&gt;&lt;/p&gt;             &lt;p class="text"&gt;&lt;/p&gt;         &lt;/div&gt;     &lt;/div&gt;     &lt;div id="sidebar"&gt;         &lt;div class="adbox-1"&gt;&lt;/div&gt;     &lt;/div&gt;     &lt;/div&gt;  &lt;script&gt;     jQuery(document).ready(function(){          // AD REPOSITION         if ($(window).width() &lt; 769) {             $('.ad-box1').insertAfter($('.intro'));                    }      }); &lt;/script&gt;   The ads are always loaded in the sidebar, but if the screen width is below 768px, they will be moved somewhere else.  I wonder if this would violate AdSense terms of service?
17049
I'm trying to post a sample of code that looks like this:        Look at all of those comments, and it still won't allow me post! What am I doing wrong?
95887
Possible Duplicate:          Is it possible to style every four posts differently? I mean something like this:  &lt;div class="row"&gt; &lt;div&gt;1st post&lt;/div&gt; &lt;div&gt;2nd post&lt;/div&gt; &lt;div&gt;3rd post&lt;/div&gt; &lt;/div&gt; &lt;div class="row&gt; &lt;div&gt;4th post&lt;/div&gt; &lt;/div&gt; ...Repeat   I'm using , so it would be great if I could experiment more with that.. :)
122693
One day I directed to SO and was met with the awesome Interesting page, which I really like. But when I travel away from it, I have to re-enter the query string to get it back. Is there a plan to make this tab visible so I can click to it anytime?
96395
When there is a long title, you have to scroll to see it:    I realise there isn't much of a solution, but it really breaks up the view of the page - so could overflow be hidden on these posts?
24291
I'm working on a WordPress site for my band and I'd like to mark every 3rd post on our blog page to have a special class applied to it, anybody have any pointers on how to achieve this? Any help is very very appreciated, thanks! rock n roll.