Print all content of a paged post

One way to acheive this is to create a filter on the_content(); This will completely stop the <!–nextpage–> shortcode from working wherever the_content(); is called in your theme – i.e. on all posts You can add the filter by adding this to your functions file: function remove_page_144242($content){ global $post; // Accesses the post content while … Read more

2nd post different layout

Ok solution found. I forgot to use the {} and now it works. Here goes: <?php $query = new WP_Query( array( ‘post_type’ => array( ‘custom_post_type’ ) ) ); $i = 0; while ( $query->have_posts() ) : $query->the_post(); if ($i%2==0){ echo ‘1st post here’; } if ($i%2==1){ echo ‘2nd post here’; } $i++; endwhile; ?>

Fixing my display pending posts

You are currently having 2 loops, while you only need one. Something like this should work: <ul> <?php $args = array( ‘post_status’ => ‘pending’); $recent_posts = wp_get_recent_posts ( $args ); foreach( $recent_posts as $recent ){ echo ‘<li><a href=”‘ . get_permalink( $recent[“ID”] ) . ‘” title=”‘ . esc_attr( $recent[“post_title”] ) . ‘”>’; echo get_the_post_thumbnail($recent[“ID”], ‘thumbnail’); echo … Read more

Voting System, database connections?

What you want are post meta/custom fields, using these functions: get_post_meta add_post_meta update_post_meta Adding a new column to the posts table will only cause further issues down the line e.g.: database schema changes in WP Core destroying your extra column having to write your own custom SQL for everything related to post votes No help … Read more

Add wp-link-pages to post

I am answering my own question. Here is the javascript that I wrote which works 100% smooth. <script> $(document).on(“scroll mousedown DOMMouseScroll mousewheel keydown”, function (e) { if (e.which > 0 || e.type === “mousedown” || e.type === “mousewheel”) { $(‘html,body’).stop(); } }); pageSize = 1; showPage = function(page) { $(“.comix”).hide(); $(“.comix”).each(function(n) { if (n >= … Read more

Same sidebar in all posts as in the category

Retrieving category post is assigned to is rather straightforward with get_the_category(). However note that post can be easily placed into multiple categories and you will need some (quite elaborate) logic if you want to apply any particular sorting logic to it. From looking at your code however it’s not clear how exactly category/post/sidebar are tied … Read more