This topic contains 4 replies, has 2 voices, and was last updated by  deepak 1 year, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #999

    deepak
    Member

    I have a small request, can you please le me know where can I find the function to edit (more…) that appears below post summary on index page, I have tried a lot but just not abel to find this text and not able to disable this . Also how can i align both post title and text , currently there is slight margin compared to title and body. I will really appreciate your help.

    This is for simplifiedblog template for wordpress.

    #1000

    PCoffee
    Keymaster

    Hi deepak,

    I am glad you are interested in the theme.

    1) To edit “more” text look here: https://codex.wordpress.org/Function_Reference/the_content
    in content templates in the theme you can see the_content() or the_excerpt() tags, modify them as explained in the previous link. For example:
    <?php the_content('I want to read more!'); ?>

    2) Look into style.css
    Go to line 131:

    .postcontent, #comment-area {
        margin: 1em 1.4em 1em 8%;
    }
    

    Change 8% to 2em, it will make postcontent on the same line as the title.

    Be aware that all the changes you make to theme files will be overwritten when the theme is updated. If you plan to make serious alterations – you should create a child theme.

    #1001

    deepak
    Member

    Thank you so much for your email. I really appreciate your response.

    I tried using the code you sent but it does not seem to work. Is there a way I can simply remove the (more..) completely.

    Thank you! again

    #1004

    PCoffee
    Keymaster

    Read the article in the codex: https://codex.wordpress.org/Function_Reference/the_content

    There are different ways to do that.

    The article suggests:

    If the_content() isn’t working as you desire (displaying the entire story when you only want the content above the <!–more–>Quicktag, for example) you can override the behavior with global $more.

    <?php 
    global $more; // Declare global $more (before the loop).
    $more = 0; // Set (inside the loop) to display content above the more tag.
    the_content("More...");
    ?>

    You should put that code in the index.php and/or category.php before the

    <?php
      if ( have_posts() ) :
    #1005

    deepak
    Member

    Really appreciate your response. I could finally fix it with adding a function.

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

You must be logged in to reply to this topic.