Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #7340

    How can I change it so the posts featured on the homepage only show a summary? In setting – reading, I’ve set ‘for each article in a feed, show’ and selected ‘summary.’ I realise that’s not necessarily the setting that will control this but cannot see any other setting that would even possibly address this issue.

    #57555

    Any help with this would be really appreciated as otherwise I’m going to have to ditch this template or else I’m going to be penalised by google for duplicate content.

    #57556

    Hey,

    you can use the read more tag/shortcode: http://codex.wordpress.org/Customizing_the_Read_More to create the excerpts.

    #57557

    Thanks Dude,

    On that page you point me to it advises that I add this code to the functions.php folder:

    // Puts link in excerpts more tag

    function new_excerpt_more($more) {

    global $post;

    return ‘ID) . ‘”> Read the full article…‘;

    }

    add_filter(‘excerpt_more’, ‘new_excerpt_more’);

    I’ve tried doing that but nothing changes on the homepage. Here is the functions.php code with the above code included. Am I putting it in the wrong place?

    <?php

    global $k_option;

    load_theme_textdomain(‘habitat’);

    add_custom_background();

    #####################################################################

    # Define Thumbnail sizes

    #####################################################################

    $k_option = array(‘width’=>70, ‘height’=>50); // small preview pics eg sidebar news

    $k_option = array(‘width’=>182, ‘height’=>130); // medium preview pic for portfolio with 4 columns

    $k_option = array(‘width’=>256, ‘height’=>170); // medium preview pic for portfolio with 3 columns

    $k_option = array(‘width’=>405, ‘height’=>230); // medium preview pic for portfolio with 2 columns

    $k_option = array(‘width’=>500, ‘height’=>235); // image for blog posts and 1 column portfolio

    $k_option = array(‘width’=>850, ‘height’=>400); // big images for fullsize pages and mainpage slider

    ##################################################################

    # Get Theme informations and save them to PHP Constants

    ##################################################################

    $the_theme = get_theme_data(TEMPLATEPATH . ‘/style.css’);

    $the_version = trim($the_theme);

    if(!$the_version) $the_version = “1”;

    //set theme constants

    define(‘THEMENAME’, $the_theme);

    define(‘THEMEVERSION’, $the_version);

    // Puts link in excerpts more tag

    function new_excerpt_more($more) {

    global $post;

    return ‘ID) . ‘”> Read the full article…‘;

    }

    add_filter(‘excerpt_more’, ‘new_excerpt_more’);

    // set Path constants

    define(‘KFW’, TEMPLATEPATH . ‘/framework/’); // ‘K’riesi ‘F’rame ‘W’ork;

    define(‘KFWOPTIONS’, TEMPLATEPATH . ‘/theme_options/’);

    define(‘KFWHELPER’, KFW . ‘helper_functions/’);

    define(‘KFWCLASSES’, KFW . ‘classes/’);

    define(‘KFWPLUGINS’, KFW . ‘theme_plugins/’);

    define(‘KFWWIDGETS’, KFW . ‘theme_widgets/’);

    define(‘KFWINC’, KFW . ‘includes/’);

    define(‘KFWSC’, KFW . ‘shortcodes/’);

    define(‘KFWAJAX’, KFW . ‘ajax/’);

    // set URI constants

    define(‘KFW_URI’, get_bloginfo(‘template_url’) . ‘/framework/’); // ‘K’riesi ‘F’rame ‘W’ork;

    define(‘KFWOPTIONS_URI’, get_bloginfo(‘template_url’) . ‘/theme_options/’);

    define(‘KFWHELPER_URI’, KFW_URI . ‘helper_functions/’);

    define(‘KFWCLASSES_URI’, KFW_URI . ‘classes/’);

    define(‘KFWPLUGINS_URI’, KFW_URI . ‘theme_plugins/’);

    define(‘KFWWIDGET_URI’, KFW_URI . ‘theme_widgets/’);

    define(‘KFWINC_URI’, KFW_URI . ‘includes/’);

    define(‘KFWINC_SC’, KFW_URI . ‘shortcodes/’);

    define(‘KFWINC_AJAX’, KFW_URI . ‘ajax/’);

    ##################################################################

    # this include calls a file that automatically includes all

    # the files within the folder framework and therefore makes

    # all functions and classes available for later use

    ##################################################################

    $autoload = array( ‘header_includes’, # javascript and css includes for header.php

    ‘lots_of_small_helpers’, # helper functions that make my developer-life easier =)

    ‘pagination’, # pagination function

    ‘nav_menu’, # alternate navigation output

    ‘kriesi_featured_images’, # display a resized image

    ‘theme_activation’

    );

    $autoload = array( ‘kclass_display_box’,

    ‘kclass_display_slideshow’,

    ‘kclass_description_walker’,

    ‘kclass_breadcrumb’,

    ‘kclass_advanced_css_style’

    );

    $autoload = array(‘kriesi_option_pages/kriesi_option_pages’,

    ‘kriesi_meta_box/kriesi_meta_box’

    );

    $autoload = array(‘sidebar_news’,’advertising_widget_dual’,’tweetbox’);

    $autoload = array(‘options’,

    ‘slideshow’,

    ‘mainpage’,

    ‘single_entry’,

    ‘portfolio’,

    ‘contact’,

    ‘sidebar_footer’,

    ‘meta_box’

    );

    $autoload = array(‘wp_list_comments’,’widgets’,’display_featured_media’);

    $autoload = array(‘pullquotes’,’columns’,’dropcaps’,’delimiter’,’toggle_tabs’,’slideshow’);

    include_once(KFW.’/include_framework.php’);

    #57558

    Hi,

    I usually paste codes like this at the bottom of the functions.php file. It should function as per the link Dude provided.

    #57559

    Thanks Chris

    I applied the change you suggested and put the following code in but still no change on the frontend. Any other suggestions? I think I’m just going to have to bin this theme and get a refund because I can’t waste anymore time trying to sort fundamental problems – especially when all the pre-sales explained how easy it was and all the support that followed, which to my mind hasn’t materialised. Thanks for your help thought Chris as I realise you’re not the developer:

    <?php

    global $k_option;

    load_theme_textdomain(‘habitat’);

    add_custom_background();

    #####################################################################

    # Define Thumbnail sizes

    #####################################################################

    $k_option = array(‘width’=>70, ‘height’=>50); // small preview pics eg sidebar news

    $k_option = array(‘width’=>182, ‘height’=>130); // medium preview pic for portfolio with 4 columns

    $k_option = array(‘width’=>256, ‘height’=>170); // medium preview pic for portfolio with 3 columns

    $k_option = array(‘width’=>405, ‘height’=>230); // medium preview pic for portfolio with 2 columns

    $k_option = array(‘width’=>500, ‘height’=>235); // image for blog posts and 1 column portfolio

    $k_option = array(‘width’=>850, ‘height’=>400); // big images for fullsize pages and mainpage slider

    ##################################################################

    # Get Theme informations and save them to PHP Constants

    ##################################################################

    $the_theme = get_theme_data(TEMPLATEPATH . ‘/style.css’);

    $the_version = trim($the_theme);

    if(!$the_version) $the_version = “1”;

    //set theme constants

    define(‘THEMENAME’, $the_theme);

    define(‘THEMEVERSION’, $the_version);

    // set Path constants

    define(‘KFW’, TEMPLATEPATH . ‘/framework/’); // ‘K’riesi ‘F’rame ‘W’ork;

    define(‘KFWOPTIONS’, TEMPLATEPATH . ‘/theme_options/’);

    define(‘KFWHELPER’, KFW . ‘helper_functions/’);

    define(‘KFWCLASSES’, KFW . ‘classes/’);

    define(‘KFWPLUGINS’, KFW . ‘theme_plugins/’);

    define(‘KFWWIDGETS’, KFW . ‘theme_widgets/’);

    define(‘KFWINC’, KFW . ‘includes/’);

    define(‘KFWSC’, KFW . ‘shortcodes/’);

    define(‘KFWAJAX’, KFW . ‘ajax/’);

    // set URI constants

    define(‘KFW_URI’, get_bloginfo(‘template_url’) . ‘/framework/’); // ‘K’riesi ‘F’rame ‘W’ork;

    define(‘KFWOPTIONS_URI’, get_bloginfo(‘template_url’) . ‘/theme_options/’);

    define(‘KFWHELPER_URI’, KFW_URI . ‘helper_functions/’);

    define(‘KFWCLASSES_URI’, KFW_URI . ‘classes/’);

    define(‘KFWPLUGINS_URI’, KFW_URI . ‘theme_plugins/’);

    define(‘KFWWIDGET_URI’, KFW_URI . ‘theme_widgets/’);

    define(‘KFWINC_URI’, KFW_URI . ‘includes/’);

    define(‘KFWINC_SC’, KFW_URI . ‘shortcodes/’);

    define(‘KFWINC_AJAX’, KFW_URI . ‘ajax/’);

    ##################################################################

    # this include calls a file that automatically includes all

    # the files within the folder framework and therefore makes

    # all functions and classes available for later use

    ##################################################################

    $autoload = array( ‘header_includes’, # javascript and css includes for header.php

    ‘lots_of_small_helpers’, # helper functions that make my developer-life easier =)

    ‘pagination’, # pagination function

    ‘nav_menu’, # alternate navigation output

    ‘kriesi_featured_images’, # display a resized image

    ‘theme_activation’

    );

    $autoload = array( ‘kclass_display_box’,

    ‘kclass_display_slideshow’,

    ‘kclass_description_walker’,

    ‘kclass_breadcrumb’,

    ‘kclass_advanced_css_style’

    );

    $autoload = array(‘kriesi_option_pages/kriesi_option_pages’,

    ‘kriesi_meta_box/kriesi_meta_box’

    );

    $autoload = array(‘sidebar_news’,’advertising_widget_dual’,’tweetbox’);

    $autoload = array(‘options’,

    ‘slideshow’,

    ‘mainpage’,

    ‘single_entry’,

    ‘portfolio’,

    ‘contact’,

    ‘sidebar_footer’,

    ‘meta_box’

    );

    $autoload = array(‘wp_list_comments’,’widgets’,’display_featured_media’);

    $autoload = array(‘pullquotes’,’columns’,’dropcaps’,’delimiter’,’toggle_tabs’,’slideshow’);

    include_once(KFW.’/include_framework.php’);

    // Puts link in excerpts more tag

    function new_excerpt_more($more) {

    global $post;

    return ‘ID) . ‘”> Read the full article…';

    }

    add_filter(‘excerpt_more’, ‘new_excerpt_more’);

    #57560

    You don’t need to add any code – just use the more tag (standard wordpress shortcode/tag) in your text. It works like:

    and I told him that he should get moving or I'd be
    on him like a limpet. He looked at me with shock on
    his face and said

    <!--more-->

    more text goes here....

    more text goes here....

    more text goes here....

    WP will display:

    and I told him that he should get moving or I'd be
    on him like a limpet. He looked at me with shock on
    his face and said

    as excerpt and when the user views the single post he will see the entire text. If you use the “html” view editor you’ll find the more tag icon in the kitchen sink.

    #57561

    I need to pick up this thread. I’m faced with the same issue; my portfolio posts are showing up in their entirety on my homepage and my portfolio page. I’ve tried to truncate them with the WP More Tag in both Visual and HTML mode with no effect.

    Within the theme there seems to be a More Tag embedded at the end of each Portfolio post. It’s invisible to me from the backend but evident to all from the front. ( jberickson.com ) Problem is, the teaser shows up at the end of the post; it takes up prime real estate on my home page and doesn’t send my reader to anywhere they haven’t just read.

    I’m no coder but I’ve been successful getting the theme 99% of the way home. I need to know how to address this last piece.

    Any current thoughts?

    #57562

    I put the teaser in the excerpts box and posted my complete text in the post and it worked like a charm. :)

    #57563

    Good to hear. Is everything solved now?

    Let us know if there’s anything else :)

    #57564

    Isn’t it possible to program a function somewhere? That the text gets trimmed after 200 words for example. Because I’ve got more then 80 articles and otherwise I have to edit all the articles with the <!–more> tag.

    Thanks

    #57565

    Hi,

    Try to edit index.php then find this code

    the_content('<span>'.__('Read more','habitat').'</span>'); ?>

    Replace it with

    the_excerpt('<span>'.__('Read more','habitat').'</span>'); ?>

    Regards,

    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Homepage is showing the full blog post of each post’ is closed to new replies.