Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Alborg37

    (@alborg37)

    Below is my content-list.php. What do you mean by “remove the a tag”?

    Thanks.


    <?php
    /**
    * Template part for displaying posts.
    *
    * @link https://codex.ww.wp.xz.cn/Template_Hierarchy
    *
    * @package OnePress
    */
    ?>

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

    <div class=”list-article-thumb”>
    “>
    <?php
    if ( has_post_thumbnail( ) ) {
    the_post_thumbnail( ‘onepress-blog-small’ );
    } else {
    echo ‘‘;
    }
    ?>

    </div>

    <div class=”list-article-content”>
    <div class=”list-article-meta”>
    <?php the_category(‘ / ‘); ?>
    </div>
    <header class=”entry-header”>
    <?php the_title( sprintf( ‘<h2 class=”entry-title”>‘, esc_url( get_permalink() ) ), ‘</h2>’ ); ?>
    </header><!– .entry-header –>
    <div class=”entry-excerpt”>
    <?php
    the_excerpt();
    ?>
    <?php
    wp_link_pages( array(
    ‘before’ => ‘<div class=”page-links”>’ . esc_html__( ‘Pages:’, ‘onepress’ ),
    ‘after’ => ‘</div>’,
    ) );
    ?>
    </div><!– .entry-content –>
    </div>

    </article><!– #post-## –>

    Thread Starter Alborg37

    (@alborg37)

    Thanks for the tip congthien, I appreciate it.

    That code works for Chrome/Firefox but not IE. Apparently IE doesn’t support pointer-events.

    You’ve got me on the right path though so thanks for that. I’ll need to investigate further:

    https://stackoverflow.com/questions/35885291/pointer-events-none

    Thread Starter Alborg37

    (@alborg37)

    Found the answer to Point 1. Additional CSS

    .list-article-meta {
    display: none;
    }

    Still looking for Point 2…..

    Thread Starter Alborg37

    (@alborg37)

    Thanks! I searched the posts on that section and found the answer to point 1:

    .list-article-meta {
    display: none;
    }

    Still looking for point 2 : )

    Hi NotaWebExpert,

    I’m having the same problem as you did. Can you explain in more detail how you resolved this please? I don’t understand your final response re:setting up categories as I already have categories setup. Also the link doesn’t work

    Thanks,

    Al.

    Thread Starter Alborg37

    (@alborg37)

    This also misled me:

    http://codex.ww.wp.xz.cn/Customizing_the_Read_More

    The Excerpt Basics

    Excerpts (teasers) can be shown on WordPress through two methods:

    The first, keeping the the_content() template tag and inserting a quicktag called more at your desired “cut-off” point when editing the post.

    The second, by replacing the the_content() template tag with the_excerpt().

    Thread Starter Alborg37

    (@alborg37)

    alchymyth. This works for me thankyou:

    <?php if ( is_search() || is_home() || is_archive() ) : // Only display Excerpts for Search ?>
    
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content">
    
    <?php the_content( __( 'Read more... <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>

    I overwrote <?php the_content( __( ‘Read more… with the_excerpt instead of setting <?php if ( is_search() || is_home() || is_archive() ) : // Only display Excerpts for Search ?> correctly. I am a complete beginner so reading code is like reading Japanese to me. I don’t fully understand it so making very small changes only where necessary and backing up everything I do. Appreciate your help on this.

    Thread Starter Alborg37

    (@alborg37)

    alchymyth,

    Thanks for the suggestions. I tried the following:

    <?php if ( is_search() || is_home() || is_archive() || is_page() || is_category() ) : // Only display Excerpts for Search ?>
    
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content">
    
    <?php the_excerpt( __( 'Read more... <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>

    It behaves in exactly the same way as before. I also checked the conditional tags index (http://codex.ww.wp.xz.cn/Function_Reference)to see if there were any relevant functions that I needed to add and could not find any specific to posts. My posts are under a category so I also added || is_category() but this made no difference.

    Essentially my home page is made up of my recent posts from my category which are excerpt’d to 55 words…or whatever with a more link. One post for example is titled “panama”. When I click on more on the panama post it opens the link to \panama but within exists the same summary as before with the same more link. It is definately going through to the post page because i have options to go to next or previous posts (left and right of page) . Problem is the full “Panama” post is not being shown.

    Thread Starter Alborg37

    (@alborg37)

    Thanks but I am still looking for a solution for my child.

    Thread Starter Alborg37

    (@alborg37)

    esmi,

    Thnaks for the reply. My single.php shows the following but no the_content tag:

    <?php
    /**
     * The Template for displaying all single posts.
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    
    get_header(); ?>
    
    <?php do_action('slideshow_deploy', '471'); ?>
    
    	<div id="primary" class="site-content">
    		<div id="content" role="main">
    
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'content', get_post_format() ); ?>
    
    				<nav class="nav-single">
    					<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
    					<span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'twentytwelve' ) . '</span> %title' ); ?></span>
    					<span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span>
    				</nav><!-- .nav-single -->
    
    				<?php // comments_template( '', true ); ?>
    
    			<?php endwhile; // end of the loop. ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    [Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

Viewing 10 replies - 1 through 10 (of 10 total)