• I’ve seen many posts about this, none of which have been responded to.

    My home page in WP includes podcast posts and regular article posts. I want to create 3 pages.

    Home – shows both articles and podcasts
    Blog – shows just articles (can’t find a way to show just articles)
    Podcast – just shows the podcast posts

    How can this be done? Please respond so that this can be answered for other people also looking to find a solution to this problem!

Viewing 8 replies - 1 through 8 (of 8 total)
  • with categories I would guess.

    Assigne the category podcast to all podcasts

    Home – standard loop showing all entries

    Blog – loop with query posts excluding the podcast category

    Podcast – loop including only the podcast category

    all done using custom category/page templates
    https://codex.www.ads-software.com/Category_Templates
    https://codex.www.ads-software.com/Pages#Page_Templates

    Thread Starter vegas23

    (@vegas23)

    Ah that seems like the right idea but I’m honestly over my head on this one I guess. I don’t know PHP.

    Guessing there is no plugin for this or anything is there? I haven’t found one anyway…

    Thread Starter vegas23

    (@vegas23)

    Let me see if I’ve figured this out…

    If I create a custom page template, and after

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    I include:

    <?php if ( in_category('3') ) { ?>
              <div class="post-cat-three">
     <?php } else { ?>
               <div class="post">
     <?php } ?>

    Then this will only show posts in that category 3 right?

    Thread Starter vegas23

    (@vegas23)

    I’m trying to piece this together but having trouble.

    I’ve created a template to use so that it only shows my category 4 (Blog category posts) which my Blog page template has been set to. I’m getting this error:

    Parse error: syntax error, unexpected T_ENDWHILE in /home/vegas/public_html/styleuncensored.com/wp-content/themes/lightword/page-blog.php on line 18

    The code is as such:

    <?php get_header(); ?>
    <div id="content-body">
    <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php if (in_category('4') ) { ?>
    
    <div <?php if (function_exists("post_class")) post_class(); else print 'class="post"'; ?> id="post-<?php the_ID(); ?>">
    <h2><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <?php edit_post_link(__('Edit this page','lightword'), '', ''); ?>
    
    <?php the_content(''); ?>
    <?php if(function_exists('wp_print')) { print_link(); } ?>
    <?php wp_link_pages('before=<div class="nav_link">'.__('PAGES','lightword').': &after=</div>&next_or_number=number&pagelink=<span class="page_number">%</span>'); ?>
    
    </div>
    <?php if ( comments_open() && $lw_disable_comments == "false" ) : comments_template(); endif; ?>
    <?php } else { ?>
    <?php endwhile; else: ?>
    
    <h2><?php _e('Not Found','lightword'); ?></h2>
    <p><?php  _e("Sorry, but you are looking for something that isn't here.","lightword"); ?></p>
    
    <?php endif; ?>
    <?php } ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I understand that this is simply a formatting issue. I’ve gotten it to load with no errors, but then no posts show up on the page…a little help?

    Thread Starter vegas23

    (@vegas23)

    Is there anywhere else to find support for wordpress?

    Thread Starter vegas23

    (@vegas23)

    So now I’ve got

    <?PHP
    /*
    Template Name: Blog Page
    */
    get_header();
    ?>
    
    <div id="content-body">
    	<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>
        <!-- Start the Loop. -->
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
            <!-- The following tests if the current post is in category 3. -->
            <!-- If it is, the div box is given the CSS class "post-cat-three". -->
            <!-- Otherwise, the div box will be given the CSS class "post". -->
            <?php if ( in_category('7') ) { ?>
                <div <?php if (function_exists("post_class")) post_class(); else print 'class="post"'; ?> id="post-<?php the_ID(); ?>">
                    <h2><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
                    <?php edit_post_link(__('Edit this page','lightword'), '', ''); ?>
    
                    <?php the_content(''); ?>
                    <?php if(function_exists('wp_print')) { print_link(); } ?>
                    <?php wp_link_pages('before=<div class="nav_link">'.__('PAGES','lightword').': &after=</div>&next_or_number=number&pagelink=<span class="page_number">%</span>'); ?>
    
                </div>
            <?php } ?>
    
            <!-- Stop The Loop (but note the "else:" - see next line). -->
        <?php endwhile; else: ?>
    
        <!-- The very first "if" tested to see if there were any Posts to -->
        <!-- display.  This "else" part tells what do if there weren't any. -->
        <h2><?php _e('Not Found','lightword'); ?></h2>
        <p><?php  _e("Sorry, but you are looking for something that isn't here.","lightword"); ?></p>
    
        <!-- REALLY stop The Loop. -->
        <?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    It’s great! Looks like the theme, but it’s just a blank page. The category 7 is the same category ID for my “Blog” category, so I don’t see how that could be wrong.

    But maybe I’m missing something?

    Thread Starter vegas23

    (@vegas23)

    Finally. Screw all this stuff…

    Plugin of the year goes to -> Page Links To

    aarrrh..whats the plugin of the year! :)) its not showing ..

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘RSS/Page Question’ is closed to new replies.