Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Well I looked in the default WP3 theme and this is the code you can use. In the single.php , use this code to show the category and tags wherever you like :

    <?php mytheme_posted_in(); ?>

    For the above to work, add this in your functions.php file :

    if ( ! function_exists( 'mytheme_posted_in' ) ) :
    
    function mytheme_posted_in() {
    	// Retrieves tag list of current post, separated by commas.
    	$tag_list = get_the_tag_list( '', ', ' );
    	if ( $tag_list ) {
    		$posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'mytheme' );
    	} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
    		$posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'mytheme' );
    	} else {
    		$posted_in = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'mytheme' );
    	}
    	// Prints the string, replacing the placeholders.
    	printf(
    		$posted_in,
    		get_the_category_list( ', ' ),
    		$tag_list,
    		get_permalink(),
    		the_title_attribute( 'echo=0' )
    	);
    }
    endif;

    For the excerpt for search and archives, use <?php the_excerpt(); ?>

    Do you mean Page Attributes? If you are using different templates for each page, then those template files also need to be copied to your new theme I think.

    I think you can look in the default theme provided by wordpress and copy-paste code from there =)

    Hi,

    I don’t know exactly what the problem is with your template but the way I used Easy Posts was to display the list on a template page which I created like :

    <?php
    /*
    Template Name: NewType
    */
    ?>
    <?php get_header() ?>
    
        <div id="page">
    	<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                <h1 class="entry-title"><?php the_title(); ?></h1>
                <?php the_content(); ?>
    
                <?php global $wp_query;
                $page_num = $paged;
                if($pagenum='') $pagenum=1;
    
                $wp_query = new WP_Query("showposts=10&post_type=webinteractive&post_status=publish&paged=".$page_num);
    
                while ($wp_query->have_posts()) : $wp_query->the_post();
                    echo '<h1 class="entry-title">';
    				the_title();
    				echo '</h1>';
    
                endwhile; ?>
    
                <div class="navigation"><p><?php if (  $wp_query->max_num_pages > 1 ) : ?>
    				<div id="nav-below" class="navigation">
    					<center><?php wp_pagenavi(); ?></center>
    				</div><!-- #nav-below -->
    <?php endif; ?></p></div></div>
        </div><!-- #container -->
    
    <?php get_footer() ?>

    This is not the exact one I used but you can get the idea and when the link was clicked, the single-newtype.php was called to display the post.

    <?php get_header() ?>
    
        <div id="page">
    	<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                <h1 class="entry-title"><?php the_title(); ?></h1>
                <?php the_content(); ?>
    	</div>
        </div>
    
    <?php get_footer() ?>

    Yes, I have an issue because of this as I use the same header in another place and changing one doesn’t automatically update the other one.

    Update to my previous post: I do not get this error when I test it on localhost using xampp on my computer; but get it on my live website.

    I get the same error when I try adding an image thumb.

    Oh I know that, and it seems to be working for normal posts, but with the custom post types created with this plugin, the pages are not getting created. Thanks anyways, will check the admin section again =)

    Thanks for your notes, helped me a lot!! Do you know how to make a certain number of posts appear on one page and the other on the next?

    I tried
    $wp_query = new WP_Query("post_type=films&post_status=publish&post_per_page=5");
    in a while loop but it doesn’t create any pages, I see all my posts on one page only. Any ideas?

Viewing 9 replies - 1 through 9 (of 9 total)