• Hi people,

    i’m making a site where i will need to post lots of contents, which basically have the same layout.. like name, year, category, date, place, etc etc

    So i was thinking about the to create some kind of special post page, where i have a form with all those items i need, so i can easily fill it in and press post so it appears nicely layout, so instead of editing the html manually..

    Any ideas how i can do this?

    Thanks!

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter Jonas_

    (@jonas_)

    I found it!

    You have to go to the template and then you can set custom post type, i added my post type there and now it shows!

    Thank you very much i appreciate you helpd me!

    Solved!

    Awesome

    Thread Starter Jonas_

    (@jonas_)

    Hmm it seems i was too enthusiastic ??

    Anyways it works fine, but if i add the post to a category where there are already other posts, it doesn’t show, neither does it show on the front page of my site.. :S

    i check the index.php but there are no special conditions, in fact this is my code:

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="box" id="post-<?php the_ID(); ?>" id="post-<?php the_ID(); ?>">
    	<?php asts_home_image();?>
    <div class="boxtitle">
    		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    </div>
    
    <div class="cover">
    	<div class="entry">
    
    		<p><?php the_content_rss('', TRUE, '', 30); ?> </p>
    
    	</div>
    	<div class="data">
    	<span class="author"> Posted by <?php the_author(); ?></span>
    	<span class="clock"> On <?php the_time('F - j - Y'); ?></span>
     		<span class="comm"><?php comments_popup_link('0 Comment', '1 Comment', '% Comments'); ?></span>
    </div>

    Also i saw that the url is now /movie_review/title
    instead of (my normal posts have this) /new-releases/title

    I would like to have it the same, any ideas?

    In order to show custom posts within the loop i believe you need to modify/write a new query. I believe the default query only looks at posts.

    as for the url i would look at your permalink settings and use the rewrite option on your register post types. just tadlock explained the two options and what they mean.

    this looks like it will get your stuff showing on the front page

    https://www.wprecipes.com/how-to-display-custom-post-types-on-your-wordpress-blog-homepage

    Thread Starter Jonas_

    (@jonas_)

    yes that works to show the posts,
    but im using a custom permalink like this: /%category%/%postname%

    but it isn’t doing that for my custom template.. i probally have to write a special thing in the functions class, but i have no idea where to start…

    edit: nvm, i used ‘rewrite’ => array(“slug” => “new-releases”)
    seems to work ??

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Custom post layout?’ is closed to new replies.