Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Cskinner387

    (@cskinner387)

    Hey there redrambles
    just wondered if you could help me again qiuckly if possible
    i have this piece of code from a website that im working on but i have a cuatom post like above that i want to add to it but can figure out where to enter the details for it as it has been written completly different to yours above.

    <div class="container" role="main">
            <div class="<?php echo apply_filters( 'tc_column_content_wrapper_classes' , 'row column-content-wrapper' ) ?>">
    
                <?php do_action( '__before_article_container'); ##hook of left sidebar?>
    
                    <div id="content" class="<?php echo tc__f( '__screen_layout' , tc__f ( '__ID' ) , 'class' ) ?> article-container">
    
                        <?php do_action ('__before_loop');##hooks the heading of the list of post : archive, search... ?>
    
                            <?php if ( tc__f('__is_no_results') || is_404() ) : ##no search results or 404 cases ?>
    
                                <article <?php tc__f('__article_selectors') ?>>
                                    <?php do_action( '__loop' ); ?>
                                </article>
    
                            <?php endif; ?>
    
                            <?php if ( have_posts() && !is_404() ) : ?>
                                <?php while ( have_posts() ) : ##all other cases for single and lists: post, custom post type, page, archives, search, 404 ?>
                                    <?php the_post(); ?>
    
                                    <?php do_action ('__before_article') ?>
                                        <article <?php tc__f('__article_selectors') ?>>
                                            <?php do_action( '__loop' ); ?>
                                        </article>
                                    <?php do_action ('__after_article') ?>
    
                                <?php endwhile; ?>
    
                            <?php endif; ##end if have posts ?>
    
                        <?php do_action ('__after_loop');##hook of the comments and the posts navigation with priorities 10 and 20 ?>
    
                    </div><!--.article-container -->
    
               <?php do_action( '__after_article_container'); ##hook of left sidebar ?>
    
            </div><!--.row -->
        </div><!-- .container role: main -->

    Thanks in advance

    Thread Starter Cskinner387

    (@cskinner387)

    Ok just one last question, i have tried to attach a link to the post so you can click the thumbnail to got to the post but it wont add the link properly for some odd reason.

    sorry for all the questions i have started working for a charity that uses wordpress and wants me to update their website for them but i am a complete newbie to wordpress

    was trying to do it like this but i lose the images and it wont link to anything

    <figure><a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail('thumbnail'); ?>"></a></figure>

    `

    Thread Starter Cskinner387

    (@cskinner387)

    Thanks redrambles

    the code you gave me works fantastically well, i take it i can add this as many times i need for pulling in custom posts on my front page by just changing the post type slug? for eg testimonials or books or cars so on.

    Also i am having problems pulling the posts into line unless i am using the wrong div to pull them into line with each other, how did you manage to do yours?

    Many thanks for your kind help

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