🔒 Este tema está cerrado para nuevas respuestas.
⏰ Solo el creador del tema puede solicitar la reapertura de sus propios temas, pero únicamente dentro de los 60 días previos a la última actualización.
En el archivo archive.php,index.php y search.php busca <?php the_excerpt(__('Read more'));?> y cámbialo por <?php the_content(__('Read more'));?>
$more_text = get_post_meta($post->ID, "more-text", true); // If you want to specify your own excerpt and 'more text' then you can do that.
if ($temp_post['post_excerpt']) { // This code block gets the excerpt and more text from the custom fields,
echo '<p>' . $temp_post['post_excerpt'] . '</p><p><a href="'; // or does something sensible if you havent specified them.
the_permalink();
echo '" class="more-link">';
if ($more_text != '')
echo get_post_meta($post->ID, "more-text", true) . '</a></p>';
else
echo 'Leer el artículo completo >></a></p>';
}
else {
if ($more_text == '') $more_text = 'Leer el artículo completo >>';
the_content($more_text);
}
?>
No amigo, los codigos que tu me das no estan en mi plantilla... encuentro esto en el index
PHP:$more_text = get_post_meta($post->ID, "more-text", true); // If you want to specify your own excerpt and 'more text' then you can do that. if ($temp_post['post_excerpt']) { // This code block gets the excerpt and more text from the custom fields, echo '<p>' . $temp_post['post_excerpt'] . '</p><p><a href="'; / or does something sensible if you havent specified them. the_permalink(); echo '" class="more-link">'; if ($more_text != '') echo get_post_meta($post->ID, "more-text", true) . '</a></p>'; else echo 'Leer el artículo completo >></a></p>'; } else { if ($more_text == '') $more_text = 'Leer el artículo completo >>'; the_content($more_text); } ?>
<?php get_header(); ?>
<!--
home.php
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ -->
<!--
Content of the page (inc comments and post details)
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ -->
<div id="page-body-wrapper">
<div id="content">
<!--
The Home Page 'Page Block'
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ -->
<?php
$thispage = new WP_Query();
$option = hmt_get_option(hmt_featured); // get the featured page option
$thispage->query('page_id=' . $option);
if (($option!="") && (!is_paged())) { // if a featured home page option has been specified
// and this is is the first page of posts, then show the featured page
$thispage->the_post(); ?>
<!--
The Home Page 'Page Block' content
~~~ -->
<div class="featured-page-content">
<!--
Widget Area: [All Content] Above
~~~ -->
<?php
dynamic_sidebar('[All Content] Above');
$ads_already_shown = TRUE; // this lets subsequent blog posts know that they are not the first thing on the page
// and therefore no ads will be shown around them. Ads only show on the first item on the page.
echo '<h1 class="h1-underline">'; the_title(); echo '</h1>'; // This is the most important thing on the page for indexing and therefore gets a H1
dynamic_sidebar('[Content Item] Above');
dynamic_sidebar('[Content Item] Left');
dynamic_sidebar('[Content Item] Right');
if (function_exists('has_post_thumbnail')) {
if (has_post_thumbnail()) { // new for 10/03/2010 - okay so if this post has a thumbnail (as per wp 2.9 thumnail features) then do something about it ?>
<div class="common-page-thumbnail-left">
<?php
the_post_thumbnail('post-image-size');
?>
</div>
<?php
}
}
the_content();
dynamic_sidebar('[Content Item] Below');
echo "\n";
?>
</div> <!-- class="featured-page-content" -->
<div class="clearFloat"></div>
<!--
The Home Page 'Page Block' post details
~~~ -->
<div class="featured-page-details">
<p>Publicado por
<?php echo get_the_author(); ?>
<?php /* the_author_posts_link(); */ /*uncomment this if you actually want a link to the authors posts - it reveals the authors username though - or am I being too security concious? */?>
el
<?php the_date(); echo ' a las '; the_time(); /* changed date and time format 19/10/09 so that default system date and time is used instead of preset date and time */ ?>
</p>
<p>
<?php edit_post_link('(Edit)', '', ''); ?>
</p>
</div> <!-- class="featured-page-details" -->
<?php
}
?>
<?php
/* Update for v2.3 19/10/09
In 2.2 common.php did not override properly in child themes.
This new code checks to see if a child theme is installed,
and then checks to see if common.php exists in the child theme.
If if does exist in the child theme then the child theme version of
common.php is included.
If not, then the common.php from the parent theme is included.
*/
$stylesheetfile = STYLESHEETPATH . '/common.php';
if (function_exists('hmt_child_theme') && (file_exists($stylesheetfile)))
include(STYLESHEETPATH."/common.php");
else
include(TEMPLATEPATH."/common.php");
/* end of update */
?>
</div> <!-- id="content" -->
<?php get_sidebar(); ?>
</div> <!-- id="page-body-wrapper" -->
<?php get_footer(); ?>
<!--
End of index.php
~~~ -->
<!--
common.php
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ -->
<!--
The Posts
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ -->
<?php $first_time_through=TRUE; // This is set so that ads are only around the first post ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<!--
Individual Post Content
~~~ -->
<div class="post-content">
<!--
Widget Area: [All Content] Above
~~~ -->
<?php
if ($first_time_through) {
if (!$ads_already_shown && !$all_content_above_already_shown) { // check to see if the ads have already been shown due to the use of the featured page option
dynamic_sidebar('[All Content] Above'); // or the display of an archive or search page
}
}
?>
<!--
The Post Title
~~~ -->
<h1 class="h2-simulate-h1-size"><a href="<?php the_permalink() ?>" rel="bookmark">
<?php the_title(); // Because single post or pages are more important for indexing, multiple post pages just have a h2 title for each item
?>
</a></h1>
<!--
Widget Area: [Content Item] Above
~~~ -->
<?php
if ($first_time_through) if (!$ads_already_shown) {
dynamic_sidebar('[Content Item] Above');?>
<!--
Widget Area: [Content Item] Left
~~~ -->
<?php
dynamic_sidebar('[Content Item] Left');
?>
<!--
Widget Area: [Content Item] Right
~~~ -->
<?php
dynamic_sidebar('[Content Item] Right');
}
?>
<!--
The content itself
~~~ -->
<?php
$temp_post = get_post($post->ID, ARRAY_A);
$ids[] = get_the_ID(); // grabs the id of the page so it can be excluded in the recent posts plus widget
if (function_exists('has_post_thumbnail')) {
if (has_post_thumbnail()) { // new for 10/03/2010 - okay so if this post has a thumbnail (as per wp 2.9 thumnail features) then do something about it ?>
<div class="common-page-thumbnail-left">
<?php
if ((is_archive())||is_search()) the_post_thumbnail('archive-image-size'); // show a smaller thumbnail if this is an archive - otherwise just show the regular sized thumbnail
else the_post_thumbnail('post-image-size');
?>
</div>
<?php
}
}
$more_text = get_post_meta($post->ID, "more-text", true); // If you want to specify your own excerpt and 'more text' then you can do that.
if ($temp_post['post_excerpt']) { // This code block gets the excerpt and more text from the custom fields,
echo '<p>' . $temp_post['post_excerpt'] . '</p><p><a href="'; // or does something sensible if you havent specified them.
the_permalink();
echo '" class="more-link">';
if ($more_text != '')
echo get_post_meta($post->ID, "more-text", true) .
'</a></p>';
else
echo 'Leer el artículo completo >></a></p>';
}
else {
if ($more_text == '') $more_text = 'Leer el artículo completo >>';
the_content($more_text);
}
?>
<!--
Widget Area: [Content Item] Below
~~~ -->
<?php if ($first_time_through) if (!$ads_already_shown) dynamic_sidebar('[Content Item] Below');?>
</div> <!-- class="post-content" -->
<div class="clearFloat"></div>
<!--
Individual Post Details
~~~ -->
<div class="post-details">
<p class="comment-button-box"><span class="comment-button"><a href="<?php the_permalink();?>#respond">
<?php comments_number('Sé el primero en comentar', '1 comentario', '% comentarios');?></a> - Qué piensa usted?</span> Publicado por
<?php echo get_the_author(); ?>
<?php /* the_author_posts_link(); */ /*uncomment this if you actually want a link to the authors posts - it reveals the authors username though - or am I being too security concious? */?>
el
<?php the_date(); echo ' a las '; the_time(); /* changed date and time format 19/10/09 so that default system date and time is used instead of preset date and time */ ?>
</p>
<p>Categorias:
<?php the_category(', ') ?>
Tags:
<?php the_tags('') ?>
</p>
<p>
<?php edit_post_link('(Edit)', '', ''); ?>
</p>
</div> <!-- class="post-details" -->
<?php $first_time_through=FALSE; ?>
<?php endwhile;
/* deleted the no posts found statement from here 30/1/2010 so that sites using pages dont have to have posts on the home page if the site is enirely made up of pages */
endif; ?>
<!--
Widget Area: [All Content] Below
~~~ -->
<?php dynamic_sidebar('[All Content] Below'); ?>
<!--
Previous and Next Page navigation
~~~ -->
<div class="post-nav"><p><?php posts_nav_link(); ?></p></div>
<!--
End of common.php
~~~ -->
function remove_more_jump_link($link) {
$offset = strpos($link, '#more-');
if ($offset) {
$end = strpos($link, '"',$offset);
}
if ($end) {
$link = substr_replace($link, '', $offset, $end-$offset);
}
return $link;
}
add_filter('the_content_more_link', 'remove_more_jump_link');
solo agrega este codigo en el archivo functions.php de tu tema:
PHP:function remove_more_jump_link($link) { $offset = strpos($link, '#more-'); if ($offset) { $end = strpos($link, '"',$offset); } if ($end) { $link = substr_replace($link, '', $offset, $end-$offset); } return $link; } add_filter('the_content_more_link', 'remove_more_jump_link');
mas info aqui
Nota: Si te marca error o algo avisame y lo convertimos en plugin, a veces algunos temas no aceptan codigo en el functions.php.
Saludos :top:
<?php
}
}
$more_text = get_post_meta($post->ID, "more-text", true); // If you want to specify your own excerpt and 'more text' then you can do that.
if ($temp_post['post_excerpt']) { // This code block gets the excerpt and more text from the custom fields,
echo '<p>' . $temp_post['post_excerpt'] . '</p><p><a href="'; // or does something sensible if you havent specified them.
the_permalink();
echo '" class="more-link">';
if ($more_text != '')
echo get_post_meta($post->ID, "more-text", true) .
'</a></p>';
else
echo 'Leer el artículo completo >></a></p>';
}
else {
if ($more_text == '') $more_text = 'Leer el artículo completo >>';
the_content($more_text);
}
?>
<a href="<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">Leer el Articulo Completo</a>
<?php
/*
Plugin Name: Leer mas sin salto
Plugin URI: none
Description: Este plugin sirve para evitar el salto del "read more"
Version: 1.0
Author: LA100RRA
Author URI: http://wpplug-ins.info/
*/
function remove_more_jump_link($link) {
$offset = strpos($link, '#more-');
if ($offset) {
$end = strpos($link, '"',$offset);
}
if ($end) {
$link = substr_replace($link, '', $offset, $end-$offset);
}
return $link;
}
add_filter('the_content_more_link', 'remove_more_jump_link');
?>
Todavia no sabemos si funciono 😛Leí todo el post; que buen trabajo que se mandaron !!!
Felicitaciones !!!
🔒 Este tema está cerrado para nuevas respuestas.
⏰ Solo el creador del tema puede solicitar la reapertura de sus propios temas, pero únicamente dentro de los 60 días previos a la última actualización.
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?