Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #25818

    This may be something I’m missing on my end, but I’m having some trouble using the more tag when I use the Avia Layout Builder to create my main page. My posts have the <!–more–> tag in them, but it doesn’t seem to be respected, no matter what I try for the mode. I’ve flipped from ‘Full Content’ to ‘Excerpt’ to ‘Excerpt with Read More Link’, but none of them work properly with where I’ve defined the more tag to go. With Full Content mode, it does what you’d expect, and just posts the full post content no matter what. With both Excerpt and Excerpt with Read More Link, I’m getting an excerpt that both doesn’t cut off where I put my more tag and also doesn’t show any new paragraph spacings if they’re present before the cut off point. It makes things look pretty horrible.

    I’m more than happy to modify code, if someone can point me to the right place, though I’d think that this should be working by default as well. (Plus, it’s a pain to have to keep doing code mods after every update.)


    Aha! I think I found it. For anyone else having the same issue, do this:

    Right After

    if(!empty($avia_config[‘preview_mode’]) && !empty($avia_config[‘image_size’]) && $avia_config[‘preview_mode’] == ‘custom’) $size = $avia_config[‘image_size’];


    global $more;
    $more = 0;

    That really should be added to the next version I think. Or, perhaps another option when creating a blog section should be there for ‘Excerpt with <!–more–> tag’.

    That’s just my two cents.


    Whoops. I should mention that the file you need to edit is loop-index.php in the ‘includes’ directory.


    Doh! I spoke too soon. Doing that code insert I just did makes it apply to the posts page as well. I’ll have to tweak this a bit I think.


    Okay, I think this time it actually works.

    In includes/loop-index.php look for this:

    while (have_posts()) : the_post();

    After that, add:

    if (!is_single()) {
    global $more;
    $more = 0;

    That does the trick for me; however, depending on your situation, you might need to use is_singular instead of is_single. I’m not 100% on the difference though, so I stuck with the one I know should work.

    Also, you’ll want to avoid using is_page,as that one breaks inside loops.

    Hopefully that helps some people out.


    Glad you found a solution. The difference between is_singular and is_single is that “is_single” will only check if you’re viewing a post or custom post. is_singular will return “true” on all “single” entry pages – posts, custom posts and pages. Only archives, search pages, etc. will return false. is_page won’t work because it only returns true on pages and it won’t work with posts.

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

The topic ‘More Tag with Blog Section’ is closed to new replies.