Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter lg100

    (@lg100)

    i am using twenty ten theme

    in word press in the posts, i should bracket all code using the code button? will this give me the look i want?

    how to use pastebin?

    Hi

    ‘yes’ to the code button highlight the code and click the code button- it inserts the back ticks

    there are many pastebins – this one is fine https://pastebin.com/

    Paste your code in there and click Submit. They give you a URL which you paste into your post on the WP forum. The point of the pastebin rule is no one on the forum wants to see endless lines of code in a post, and it takes up a lot of storage space too, for years to come. Pastebins keep the code for a while and serve the purpose well.

    I’m not sure how to help you further get the excerpt changes you want. When you paste this code

    function excerpt_ellipse($text) {  // custom 'read more' link
       return str_replace(' [...]', '... <a href="'.get_permalink().'"><br />Read more</a>', $text); }
    add_filter('the_excerpt', 'excerpt_ellipse');

    in functions.php, it simply changes the excerpt from ellipses to a read more link. Insert it at the bottom of your theme’s functions.php file, just before the closing ?> at the very bottom of the file. Its really very simple and I don’t know why its not working for you.

    Thread Starter lg100

    (@lg100)

    thanks for your pastebin tips i will use them.
    on my index page the tags on the bottom of my posts when clicked show the page the way i want it. the index page still shows full posts.
    the changes i made yesterday are no longer there.
    thanks for your help i am new at this i will go into wp settings and wp lessons.
    i see that visitors can only comment on posts not make a post where would i find info on this.
    again thank for your help

    hi

    Its quite fine to be new at it. That’s really what the forum is for, to help people learn.

    in the 2010 theme when you click on a tag as you are describing what opens is called a Tag page, that does display excerpts. that is what I was trying to help you get to on your home page.

    Post your index.php and loop.php files in a pastebin. If you have a file called loop-index.php post that also. That would be a custom file and you may not have one.

    As far as having visitors make posts, that is not yet a strongly developed area within WordPress. There is a plugin called TDO forms that allows that. It is complex to configure.

    My suggestion for a simpler solution is look at Gravity Forms. (That is a paid plugin. I have no commercial interest in it.) You can easily create a form with all the fields needed to create a WordPress post, then display the form on a post or page. Submissions go to “Needs Approval” status and after review become posts on your site. They have their own support forum.

    Thread Starter lg100

    (@lg100)

    hi,thanks again, isn’t there a wp template that is set up this way?

    index.php https://pastebin.com/wZpdzRsD
    loop.php https://pastebin.com/bH3F8YaH

    yes, many themes are set up that way. you didn’t list changing your theme as one of the options when you asked about changing from full posts to summaries. you can certainly do that, and it will take no coding to do so.

    Let’s try it again. In loop.php lines 137 – 146 (look at the pastebin to see the line number)

    <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
    	<div class="entry-summary">
    		<?php the_excerpt(); ?>
    	</div><!-- .entry-summary -->
    ?php else : ?>
    	<div class="entry-content">
    		<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
    		<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
    	</div><!-- .entry-content -->
    <?php endif; ?>

    change line 137, the first line to read like this:

    <?php if ( is_archive() || is_search() || is_home() ) : // Only display excerpts for archives and search and blog page. ?>

    That should display excerpts on your blog page. The code is in the file twice – make sure you change the right line – line 137.

    Thread Starter lg100

    (@lg100)

    great,got it. thanks again for all your help. larry g

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘index page’ is closed to new replies.