Welcome to PressWork!

Want to ask a question or join the discussion? Great! Join now.

In this Discussion

help me! "read more"
  • I will not "read more" automatic. Can you explain how to remove "read more"
    Thanks.
  • The quick way
    .more-link { display: none; }

    put this in your custom css
    http://presswork.me/2011/custom-css-and-custom-actions/
    image PressWork Support Moderator
  • thanks a lot
    sorry but I'm not very experienced.
    I did not understand where should I put this line.
    could you give me more information to solve the problem?

    for me to use the template depends on this issue.

    thanks again
  • You have to create a file named custom.css and copy the line
    .more-link { display: none; }
    in it.
    Then you upload the file custom.css to your server in the wp-content/uploads directory.
    image PressWork Support Moderator
  • ok wrote the perfect know more is gone! thanks ...

    I would like to see everything that the article on the home page

    is it possible?
  • Copy this in a file that you name custom-actions.php that you will upload to your server in the same uploads directory that you used before for custom.css
     
    <?php
    /*
    * Get full content post for home page (does not affect Featured posts) */

    function custom_post_content($ignore_image = false, $excerpt_length = 55, $hide_readmore = false, $display_excerpt = false) {
    echo pw_function_handle(__FUNCTION__);
    ?>
    <div class="storycontent">
    <?php
    if(is_home()){
    the_content();
    } else {
    if(function_exists('has_post_format') && !is_singular()) {
    $format = get_post_format();
    if(empty($format) || has_post_format('image')) {
    if(has_post_format('image')) $size = 'full'; elseif(empty($ignore_image)) $size = 'small'; else $size = 'thumbnail';
    if(function_exists('has_post_thumbnail') && has_post_thumbnail()) {
    if(empty($ignore_image) || has_post_format('image')) {
    echo '<a href="'.get_permalink().'" class="image-anchor">';
    the_post_thumbnail($size, array( 'class' => 'alignleft' ));
    echo '</a>';
    }
    } else {
    if(has_post_format('image'))
    the_content();
    }
    if(empty($format)) {
    pw_excerpt($excerpt_length);
    if(empty($hide_readmore)) echo '<a href="'.get_permalink().'" class="more-link">'.__('Read more &rarr;', "presswork").'</a>';
    }
    } elseif(has_post_format('gallery')) { // new gallery post format
    global $post;
    $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
    if ( $images ) :
    $total_images = count( $images );
    $image = array_shift( $images );
    $image_img_tag = wp_get_attachment_image( $image->ID, 'full' );
    ?>
    <a class="gallery-thumb img-shadow alignnone" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
    <p class="gallery-text clearfix fl"><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo &rarr;</a>', 'This gallery contains <a %1$s>%2$s photos &rarr;</a>', $total_images, "presswork" ), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', "presswork" ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
    number_format_i18n( $total_images )
    ); ?></em>
    </p>
    <?php endif; ?>
    <?php
    } else {
    // new aside || link || audio || video || image post format
    echo '<div class="pformat clearfix">';
    the_content('');
    echo '</div>';
    }
    } else {
    if(!empty($display_excerpt))
    pw_excerpt($excerpt_length);
    else
    the_content( __( 'Read more &rarr;', "presswork" ) );
    }
    }
    ?>
    </div>
    <?php
    }
    remove_action('pw_index_post_middle', 'pw_post_content', 11);
    add_action('pw_index_post_middle', 'custom_post_content', 11);
    ?>


    Additionally you might want to use this in your custom css also so your full posts stretch all the way :

    .home article {
    width: 100%;
    }

    .
    Post edited by cestbibi at 2012-02-17 11:21:20
    image PressWork Support Moderator
  • Thank you! solved.
    Now I have a problem between Firefox safari etc explore.
    In some sidebar widgets appear misaligned.

    You can eliminate this problem?