Site5

Menu

Support Forums

Blog does not work

Home Forums Veecard Blog does not work

Tagged: 

This topic contains 24 replies, has 17 voices, and was last updated by  leilei3915 5 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
  • #8479

    Dirk
    Participant

    Hello, I apparently have the same problem like this fella over here: http://wordpress.org/support/topic/veecard-theme-cant-create-blog

    I created a blog page using the blog template but none of my blogposts is showing up. Whats wrong? Are there any special settings missing?

    Thanks for support!

    BR
    Dirk

    #8606

    giosue
    Participant

    I have the same problem. How can we resolve it?

    #8609

    simi_id
    Participant

    Log-in into your wordpress account, go to Appearance -> Editor, there on the right side search for Blog Page Template (page-temp-blog.php) and replace all the content with following content:

    <?php

    /*

    Template Name: Blog

    */

    get_header(); ?>

     

     

    <div class=”column-left”>

     

    <h1><?php the_title() ?></h1>

     

    <?php

    // WP 3.0 PAGED BUG FIX

    if ( get_query_var(‘paged’) )

    $paged = get_query_var(‘paged’);

    elseif ( get_query_var(‘page’) )

    $paged = get_query_var(‘page’);

    else

    $paged = 1;

     

    $args = array(

    ‘post_type’ => ‘post’,

    ‘paged’ => $paged );

     

    query_posts($args);

    ?>

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

     

    <article id=”post-<?php the_ID(); ?>” <?php post_class(‘clearfix’); ?> role=”article”>

     

    <?php if(has_post_thumbnail()): the_post_thumbnail(‘thumbnail’, array(‘class’=>’blog-thumb’)); ?><?php endif; ?>

     

    <header>

    <h2 class=”post-title”><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2>

     

    <div class=”meta”>

    <?php echo get_the_date(); ?> | <?php the_category(‘, ‘); ?> | <?php _e(‘by’,’site5framework’) ?> <?php the_author(); ?>

    </div>

    </header>

     

    <?php the_excerpt(); ?>

     

    </article>

     

    <?php endwhile; ?>

     

     

    <!– begin #pagination –>

    <?php if (function_exists(“emm_paginate”)) {

    emm_paginate();

    } else { ?>

    <div class=”navigation”>

    <div class=”alignleft”><?php next_posts_link(‘Older’) ?></div>

    <div class=”alignright”><?php previous_posts_link(‘Newer’) ?></div>

    </div>

    <?php } ?>

    <!– end #pagination –>

     

    <?php endif;?>

     

    <?php wp_reset_query(); ?>

     

    </div>

     

    <div class=”column-right”>

    <?php get_sidebar(); ?>

    </div>

     

    <?php get_footer(); ?>

    #8610

    Dirk
    Participant

    There is another way without chaning any templates: I created a category called “Blog”. It’s the only category. All posts are stored using this category.

    Then this category was added to the custom menu and now all the blogposts are shown quite well along with widgets on the sidebar.

    #8611

    giosue
    Participant

    The php code doesn’t work…

    The result is a page like this:

    < ?php /* Template Name: Blog */ get_header(); ?>

    < ?php the_title() ?>
    < ?php // WP 3.0 PAGED BUG FIX if ( get_query_var(‘paged’) ) $paged = get_query_var(‘paged’); elseif ( get_query_var(‘page’) ) $paged = get_query_var(‘page’); else $paged = 1; $args = array( ‘post_type’ => ‘post’, ‘paged’ => $paged ); query_posts($args); ?> < ?php if (have_posts()) : while (have_posts()) : the_post(); ?>” < ?php post_class(‘clearfix’); ?> role=”article”> < ?php if(has_post_thumbnail()): the_post_thumbnail(‘thumbnail’, array(‘class’=>’blog-thumb’)); ?>< ?php endif; ?>
    “>< ?php the_title(); ?>
    < ?php echo get_the_date(); ?> | < ?php the_category(‘, ‘); ?> | < ?php _e(‘by’,’site5framework’) ?> < ?php the_author(); ?>
    < ?php the_excerpt(); ?>< ?php endwhile; ?> < ?php if (function_exists(“emm_paginate”)) { emm_paginate(); } else { ?>

    < ?php next_posts_link(‘Older’) ?>
    < ?php previous_posts_link(‘Newer’) ?>

    < ?php } ?> < ?php endif;?> < ?php wp_reset_query(); ?>
    < ?php get_sidebar(); ?>
    < ?php get_footer(); ?>

     

    Any other solution?

    Thank you

    #8612

    giosue
    Participant

    Ok … I this is the right code to paste in page-temp-blog.php !

    <?php /* Template Name: Blog */ get_header(); ?>

    <div class=”column-left”>
    <h1><?php the_title() ?></h1>
    <?php // WP 3.0 PAGED BUG FIX if ( get_query_var(‘paged’) ) $paged = get_query_var(‘paged’); elseif ( get_query_var(‘page’) ) $paged = get_query_var(‘page’); else $paged = 1;
    $args = array( ‘post_type’ => ‘post’, ‘paged’ => $paged );
    query_posts($args); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <article id=”post-<?php the_ID(); ?>” <?php post_class(‘clearfix’); ?> role=”article”>
    <?php if(has_post_thumbnail()): the_post_thumbnail(‘thumbnail’, array(‘class’=>’blog-thumb’)); ?><?php endif; ?>
    <header> <h2 class=”post-title”><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2>
    <div class=”meta”> <?php echo get_the_date(); ?> | <?php the_category(‘, ‘); ?> | <?php _e(‘by’,’site5framework’) ?> <?php the_author(); ?> </div> </header>
    <?php the_excerpt(); ?>
    </article>
    <?php endwhile; ?>

    <!– begin #pagination –> <?php if (function_exists(“emm_paginate”)) { emm_paginate(); } else { ?> <div class=”navigation”>         <div class=”alignleft”><?php next_posts_link(‘Older’) ?></div> <div class=”alignright”><?php previous_posts_link(‘Newer’) ?></div>     </div>     <?php } ?> <!– end #pagination –>
    <?php endif;?>
    <?php wp_reset_query(); ?>
    </div>
    <div class=”column-right”> <?php get_sidebar(); ?> </div>
    <?php get_footer(); ?>

    bye all

    #8613

    simi_id
    Participant

    Yes, the formatting here doesn’t work so well. 🙂 Glad you fix it …

    #8617

    giosue
    Participant

    ;D

    #8680

    TheGoddess
    Member

    Crap I used that code and now it’s completely useless!!!

    #8686

    dctanugi
    Member

    I think I’ve fixed it! The problem was that the double quotation marks were poorly formatted in the previous suggestion.

    So replace the contents of page-temp-blog.php with:

    <?php /* Template Name: Blog */ get_header(); ?>

     

    <div class=”column-left”>

    <h1><?php the_title() ?></h1>

    <?php // WP 3.0 PAGED BUG FIX if ( get_query_var(‘paged’) ) $paged = get_query_var(‘paged’); elseif ( get_query_var(‘page’) ) $paged = get_query_var(‘page’); else $paged = 1;

    $args = array( ‘post_type’ => ‘post’, ‘paged’ => $paged );

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

    <article id=”post-<?php the_ID(); ?>” <?php post_class(‘clearfix’); ?> role=”article”>

    <?php if(has_post_thumbnail()): the_post_thumbnail(‘thumbnail’, array(‘class’=>’blog-thumb’)); ?><?php endif; ?>

    <header> <h2 class=”post-title”><a href=”<?php the_permalink(); ?>“><?php the_title(); ?></a></h2>

    <div class=”meta”> <?php echo get_the_date(); ?> | <?php the_category(‘, ‘); ?> | <?php _e(‘by’,’site5framework’) ?> <?php the_author(); ?> </div> </header>

    <?php the_excerpt(); ?>

    </article>

    <?php endwhile; ?>

     

    <!– begin #pagination –> <?php if (function_exists(“emm_paginate”)) { emm_paginate(); } else { ?> <div class=”navigation”>         <div class=”alignright”><?php next_posts_link(‘Older’) ?></div> <div class=”alignright”><?php previous_posts_link(‘Newer’) ?></div>     </div>     <?php } ?> <!– end #pagination –>

    <?php endif;?>

    <?php wp_reset_query(); ?>

    </div>

     

    <div class=”column-right”> <?php get_sidebar(); ?></div>

     

    <?php get_footer(); ?>

    #8931

    Anonymous

    dctanugi has the right answer, but when he posted the code, spaces were added between the “<” and “?”. I tried to copy/paste my corrected code in this post and the same problem came back. Just replace all of the “< ?” with “<?” and the blog template works like advertised. Thanks for helping me fix my site.

    #8939

    Anonymous

    Also, I had to remove the quotes from the href to get the blog links to work correctly. Here is the incorrect one first and then the corrected one.

    <header> <h2 class=”post-title”><a href=”< ?php the_permalink(); ?>“>< ?php the_title(); ?></a></h2>

    <header> <h2 class=”post-title”><a href=< ?php the_permalink(); ?>>< ?php the_title(); ?></a></h2>

    #8963

    I had the same issue, I’m guessing everyone does looking at the code in the template, however it’s shifted my menu in the blog down to the bottom of the page, did anyone else have the same issue?

    #9100

    ejumarin
    Member

    Can you post the full code to replace it?

    #9101

    ejumarin
    Member

    I also have the same issue. My menu shifted down to the bottom of the page and I can’t fix it. Please help.

Viewing 15 posts - 1 through 15 (of 25 total)

You must be logged in to reply to this topic.