• Resolved ckadet

    (@ckadet)


    Hello,

    I want to remove the ‘read more’ button under these posts on this category page and also perhaps increase the number of words it shows for each post. I don’t know what file to edit.

    https://habitswap.com/?cat=4

    Thanks,

    Chris

Viewing 13 replies - 1 through 13 (of 13 total)
  • Try creating a new template file for that category.

    Thread Starter ckadet

    (@ckadet)

    Is there an easier way?

    Not if you want to only make this change for 1 specific category.

    Thread Starter ckadet

    (@ckadet)

    I want to be able to have multiple categories that have the same template as I am describing.

    Thread Starter ckadet

    (@ckadet)

    Basically, for all of the “category” pages, I want it to have the template in the example above MINUS the read more button.

    In that case you could amend your current category template file (presumably catgeory.php) by adding <?php global $more; $more = -1;?> before the start of the Loop.

    Thread Starter ckadet

    (@ckadet)

    Where is the start of the loop? :S

    Thread Starter ckadet

    (@ckadet)

    I am editing category.php as we speak, from wp-includes.

    No!!

    You need to edit your theme’s category.php file.

    Thread Starter ckadet

    (@ckadet)

    LOL. Right. I am in categories.inc.php… I believe that is the file. It reads:

    <?php
    $parents = getParentCategories();
    foreach($parents as $parent) {
    echo “<div class=’box’><h3>id ).”‘>$parent->name</h3>”;
    $children = getChildCategories($parent->id);
    $index = 0;
    foreach ($children as $child) {
    if($index%4 == 0) {
    echo ”

      “;
      }
      remove_filter(‘term_description’,’wpautop’);
      if ( category_description( $child->id ) == “”) {
      $linkdescription = $parent->name.’ » ‘.$child->name;
      } else {
      $linkdescription = category_description( $child->id );
      } echo

    Thread Starter ckadet

    (@ckadet)

    These are the other files that I can access from WordPress.

    404 Template
    (404.php)

    All Posts Page Template
    (posts.php)

    Comments
    (comments.php)

    Footer
    (footer.php)

    Header
    (header.php)

    Main Index Template
    (index.php)

    Newsletter Page Template
    (newsletter.php)

    Page Template
    (page.php)

    Search Form
    (searchform.php)

    Search Results
    (search.php)

    Sidebar
    (sidebar.php)

    Single Post
    (single.php)

    Theme Functions
    (functions.php)

    categories.inc.php
    (categories.inc.php)

    home.php
    (home.php)

    popup_comment.inc.php
    (popup_comment.inc.php)

    thumb.inc.php
    (thumb.inc.php)

    thumbBigger.inc.php
    (thumbBigger.inc.php)

    timthumb.php
    (timthumb.php)

    widgets.php
    (widgets.php)

    Styles
    Stylesheet
    (style.css)

    My guess is that your theme is re-using the index.php template file to display your categories and archives. If you are posting small code snippets can you post them inside backticks (or use the code button) so that the code remains readable. Larger code blocks should be placed in the the pastebin and the pastebin url posted here.

    Thread Starter ckadet

    (@ckadet)

    Excellent! I removed a line in the index file and it fixed my problem. Thank you!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Removing 'read more' link on Category page’ is closed to new replies.