How do I paginate a custom post type listing on a custom template page?
What i found was the easiest way to solve this problem – and what i eventually ended up doing – was to build a custom pagination using querystrings.
What i found was the easiest way to solve this problem – and what i eventually ended up doing – was to build a custom pagination using querystrings.
You’re not being very specific so it’s hard to give you any help. But if you would like to output both pages and posts in the same loop you need to customize your query so that it includes both posts and pages. Learn about http://codex.wordpress.org/Class_Reference/WP_Query. Or if you want the posts to be outputted at … Read more
WOO WOO! I got it! I’m using a custom theme for Genesis, so you may see some of that in the notes below, but here it is in case anyone wants to see it. In functions.php /** Display author box on single posts */ add_filter( ‘get_the_author_genesis_author_box_single’, ‘__return_true’ ); /** Display author box on archive pages … Read more
Ok, this code should set you on the right path. It’s not designed to do exactly what you want, but judging by your code above, you seem fairly compitent, so should be able to amend as required. I’d also recommend looking at the Walker_Page Class, that way you can compare the methods below to those … Read more
In your second code block (single case study), you’re overriding the main query: <?php query_posts( ‘post_type=case-study’ ); ?> Get rid of it!
I can’t really speak to the performance simply because I’ve not dug in to the internals. But from a pure logic approach the custom meta makes more sense to me. The reason being that, at least from your description, you only really need a single field for each post/page. All you’re doing is reading a … Read more
With that function in functions.php it is going to run on every page load and every time it runs it is going to insert a post for every user in your database. It isn’t an infinite loop. You are just running it all the time. You need to run that one time and one time … Read more
Ok, with the use of this ‘plugin’ (JareDatch). It works like a charm. add_filter( ‘cmb_meta_boxes’, ‘cmb_sample_metaboxes’ ); /** * Define the metabox and field configurations. ** @param array $meta_boxes * @return array */ function cmb_sample_metaboxes( array $meta_boxes ) { // Start with an underscore to hide fields from custom fields list $prefix = ‘_cmb_’; $meta_boxes[] … Read more
Pass a third argument true to both previous/next_post_link() (see codex)
Some spiders honor the <noindex>…</noindex> tags within a page so in that case you could simply wrap your FAQ content with <noindex></noindex>. But I honestly don’t know if Google or for that matter which spiders honor the tag. Since this is not really a WordPress question it’s off topic for this forum. You’d more than … Read more