Site5

Menu

Support Forums

Blog in Homepage

Home Forums Webfolio Blog in Homepage

This topic contains 18 replies, has 7 voices, and was last updated by  ninest123 3 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
  • #11856

    Procyon
    Participant

    Hi,

    I am a new(bie) user of webfolio theme and i have a little problem. I want to have my posts under the slider in homepage. I manage to delete Content Boxes but articles…

    Can we help me please ? ๐Ÿ™‚

    Thank you very much for your future answers.

    Procyon

    #11884

    Guido
    Participant

    You should change php file home and add this underneath <!-- end home boxes --><?php }?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h3 class="entry-title"><a>" title="<?php _e('Permalink to ', 'shipyard'); ?><?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    
    <h5 class="postmetadata"><?php _e('Posted on ', 'shipyard'); ?><a>"><?php echo get_the_date(); ?></a> | <?php _e('Posted by ', 'shipyard'); ?> <?php the_author_posts_link() ?></h5>
    
    <?php if ( has_post_thumbnail() ) { 
    the_post_thumbnail(); 
    } ?>
    
    <?php the_excerpt(); ?>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.', 'shipyard'); ?></p>
    <?php endif; ?>
    
    <div class="post-nav">
    	<div class="nav-prev"><?php next_posts_link(__( 'ยซ Older posts', 'shipyard' )) ?></div>
    	<div class="nav-next"><?php previous_posts_link(__( 'Newer posts ยป', 'shipyard' )) ?></div>
    </div>

    And add this in Theme Options > Custom CSS:

    .nav-prev {float:left;}
    .nav-next{float:right;}

    Guido

    #11888

    Procyon
    Participant

    Hey !

    Thanks !

    there is a little problem : instead of link with name of the post, it wrote :

    “title=”Permalink to name_of_the_post” rel=”bookmark”>name_of_the_post

    Edit : i manage to correct this problem (a > is not in the good place ^^) but an other problem came, there is no link ton article with the title and no link to article of the same date with the date.

    • This reply was modified 4 years, 6 months ago by  Procyon.
    #11899

    Procyon
    Participant

    Hiยฒ !

    Sorry for the second post but i have an other problem, i would to have a page “blog” as in the demo but how can i do ?

    http://demo.s5themes.com/webfolio/category/blog/

    Thanks ๐Ÿ™‚

    #11937

    Guido
    Participant

    Hi,

    First, my code is added incorrect at this forum… that’s why error occurs.
    I also notice I forgot to change the translationpath (Newer posts / ‘shipyard’ ).
    So I try again:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <h3 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php _e('Permalink to ', 'site5framework'); ?><?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    
    <h5 class="postmetadata"><?php _e('Posted ', 'site5framework'); ?><a href="<?php the_permalink(); ?>"><?php echo get_the_date(); ?></a> | <?php _e('Posted by ', 'site5framework'); ?> <?php the_author_posts_link() ?></h5>
    
    <?php if ( has_post_thumbnail() ) { 
    the_post_thumbnail(); 
    } ?>
    <?php the_excerpt(); ?>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.', 'site5framework'); ?></p>
    <?php endif; ?>
    
    <div class="post-nav">
    <div class="nav-prev"><?php next_posts_link(__( '&laquo; Older posts', 'site5framework' )) ?></div>
    <div class="nav-next"><?php previous_posts_link(__( 'Newer posts &raquo;', 'site5framework' )) ?></div>
    </div>
    #11938

    Guido
    Participant

    Create Blogpage:

    On the demo site they added a post category as blog via the WordPress menupage (on the left hand side you can add blog categorie(s) to the menu).

    Guido

    #11944

    Procyon
    Participant

    Thanks you very much. It works !

    Thanks too for the blog. An idea to add a pagination in this blog page ?

    ๐Ÿ™‚

    #11949

    Guido
    Participant

    As far as I know there is pagination in blog page. You can set amount of posts/page at Settings > Reading.

    Guido

    #11950

    Procyon
    Participant

    Yes. ><‘ no comment.

    Thank you very much !

    #11974

    Guido
    Participant

    You’re welcome!
    If you have some spare time, I appreciate it if you review one of my Themes or Plugin on WordPress.org: http://profiles.wordpress.org/guido07111975

    Guido

    #12455

    arslando
    Participant

    hi Guido,

    I have done your steps as well, so adding blog on homepage, taht works, just one question, the 3 boxes (homebox1,2,3) is still visible!

    so what I need is, just slider and under the slider my blog with sidebar? is this possible?

    #12470

    Guido
    Participant

    You can remove the 3 boxes from php file home.

    Staring with:
    <?php if(of_get_option('webfolio_homecontent') == '1') { ?>

    Ending with:
    <?php } ?>

    Guido

    #12484

    arslando
    Participant

    Thanks Guido.

    last question sorry. is it possible to add a picture to every blog entry, I mean on the homeage, the blog preview site, is it possible to add to each blog a different image?

    #12485

    arslando
    Participant

    Guido, I just removed the 3 boxes.

    I now get an error message

    Parse error: syntax error, unexpected ‘}’ in /wp-content/themes/webfolio/home.php on line 50

    my home.php

    <?php get_header(); ?>
    <?php 
        if(of_get_option('webfolio_displayslider')==1 and of_get_option('webfolio_slidertype')!="none") {
    ?>
        <?php if(of_get_option('webfolio_slidertype')=='nivo') { ?>
            <?php get_template_part( 'homepage', 'slider-nivo' ); ?>
        <?php } elseif(of_get_option('webfolio_slidertype')=='flex') { ?>
            <?php get_template_part( 'homepage', 'slider-flex' ); ?>
        <?php } ?>
    <?php
        }
    ?>
    
                
    		</div>
    		<div class="homeBox">
    			<h2><?php echo of_get_option('webfolio_homecontent2title') ?></h2>
                <p><img src="<?php echo of_get_option('webfolio_homecontent2img') ?>" class="alignleft" alt="<?php echo of_get_option('webfolio_homecontent2title') ?>" /> <?php echo of_get_option('webfolio_homecontent2') ?></p>
                <?php if (of_get_option('webfolio_homecontent2url')!='') { ?>
    			<a href="<?php echo of_get_option('webfolio_homecontent2url') ?>" class="more-link"><?php _e('weiter', 'site5framework') ?></a>
    			<?php } ?>
    		</div>
    		<div class="homeBox last">
    			<h2><?php echo of_get_option('webfolio_homecontent3title') ?></h2>
                <p><img src="<?php echo of_get_option('webfolio_homecontent3img') ?>" class="alignleft" alt="<?php echo of_get_option('webfolio_homecontent3title') ?>" /> <?php echo of_get_option('webfolio_homecontent3') ?></p>
                <?php if (of_get_option('webfolio_homecontent3url')!='') { ?>
    			<a href="<?php echo of_get_option('webfolio_homecontent3url') ?>" class="more-link"><?php _e('weiter', 'site5framework') ?></a>
    			<?php } ?>
    		</div>
    	</div>
    	<!-- end home boxes -->
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <h3 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php _e('Permalink to ', 'site5framework'); ?><?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    
    <h5 class="postmetadata"><?php _e('Posted ', 'site5framework'); ?><a href="<?php the_permalink(); ?>"><?php echo get_the_date(); ?></a> | <?php _e('Posted by ', 'site5framework'); ?> <?php the_author_posts_link() ?></h5>
    
    <?php if ( has_post_thumbnail() ) { 
    the_post_thumbnail(); 
    } ?>
    <?php the_excerpt(); ?>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.', 'site5framework'); ?></p>
    <?php endif; ?>
    
    <div class="post-nav">
    <div class="nav-prev"><?php next_posts_link(__( '&laquo; Older posts', 'site5framework' )) ?></div>
    <div class="nav-next"><?php previous_posts_link(__( 'Newer posts &raquo;', 'site5framework' )) ?></div>
    </div>
        <?php }?>
    
    <?php get_footer(); ?>
    #12504

    Guido
    Participant

    You did not remove all boxes.

    You can remove the 3 boxes from php file home.

    Staring with:
    <?php if(of_get_option('webfolio_homecontent') == '1') { ?>

    Ending with:
    <?php } ?>
    I mean just above:
    <?php get_footer(); ?>

    Guido

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

You must be logged in to reply to this topic.