How can I split long posts into pages?
Your theme must have support for the <!–nextpage–> tag. You will need to add <?php wp_link_pages(); ?> in your post loop. http://codex.wordpress.org/Function_Reference/wp_link_pages
Your theme must have support for the <!–nextpage–> tag. You will need to add <?php wp_link_pages(); ?> in your post loop. http://codex.wordpress.org/Function_Reference/wp_link_pages
What your asking for has the basic functionality of a plugin, so saying you don’t want to use a plugin doesn’t make much sense. If you do for some reason want to write your own , using any jquery or JavaScript is relatively straightforward, you enqueue the script where you want it, then wrap whatever … Read more
I have had similar problems with the number attribute in get_pages() I got around it by using get_children: $pages = get_children(array( ‘numberposts’ =>1, ‘post_parent’ => $heading_page->post_id )); and using post_parent instead of child_of.
Try this… <?php //prevent this div from displaying for pages: if ( get_post_type() != ‘page’ ) : ?> <div class=”searchdate”><?php the_time(‘F jS, Y’) ?></div> <?php endif; ?> The is_page() conditional tag only checks if currently displayed content is a single page view. Nothing for you at this point. See http://codex.wordpress.org/Function_Reference/is_page
Where are you doing your code parsing? If you’re doing it directly in the template file, inside the Loop, then you should be using get_the_content(). However, it might be more efficient to filter the_content(), via the the_content filter. e.g. in functions.php: function mytheme_filter_the_content( $content ) { // add code here to filter the_content // which … Read more
Strictly speaking title is column in posts database table so it is not easy (or makes sense) to add one more title. But it is trivial to emulate by using custom field to store additional title (or anything else).
Unless you have added the functionality with a plugin or custom code, Pages are not placed in Categories. Pages are organized with Parent Pages and Children Pages. This is why (I suspect) in_category() does not work in page.php The following code in functions.php will add categories to Pages. /** * Add categories to Pages. * … Read more
I think what you might need is simply to run register_sidebar() in an ‘widgets_init’ hook. The TwentyTen theme has examples for register_sidebar() in its functions.php file, but here’s what it might look like: add_action( ‘widgets_init’, ‘twentyten_widgets_init’ ); function twentyten_widgets_init() { register_sidebar( array( ‘name’ => __( ‘News Sidebar’, ‘yoursite’ ), ‘id’ => ‘sidebar-news’, ‘description’ => __( … Read more
Basically a duplicate of this question. It comes up a lot, and the remove category base functionality probably should be an option in WordPress to be honest. Here was my answer from there: No Category Base plugin to remove the /category/ bit from the URL. 🙂 If you have a page with the same name … Read more
Not sure if it is the most elegant way but the easiest is probably to create a shortcode that displays a single page, and then set that page to display as the front page. e.g. http://wordpress.org/extend/plugins/post-content-shortcodes/