Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #574789

    Hello. I’ve looked at the post at https://kriesi.at/support/topic/sticky-post-with-post-filtered-by-category/ and tried the solution offered of adding a category called “sticky” and using an extra Blog Posts element to display the sticky category posts. The problem is that when there is not a sticky post (i.e., the admin doesn’t want any post to be sticky), the element displays “NOTHING FOUND Sorry, no posts matched your criteria”. I would prefer that the element be hidden if there are no posts in that category. Is there a way to do this, or is there another solution for having a sticky post in a Blog Posts element?

    I tried using the Post Types Order plugin as suggested in another post in this forum. As far as I can tell, however, after setting the order, if I add a new post, that new post is going to be on top of the post I just set at the top using the plugin, so the solution doesn’t work.

    #574875

    Hey 1039 Online!

    Try deleting lines 293 – 391 in the /enfold/includes/loop-index.php file.

        <article class="entry">
            <header class="entry-content-header">
                <h1 class='post-title entry-title'><?php _e('Nothing Found', 'avia_framework'); ?></h1>
            </header>
    
            <p class="entry-content" <?php avia_markup_helper(array('context' => 'entry_content')); ?>><?php _e('Sorry, no posts matched your criteria', 'avia_framework'); ?></p>
    
            <footer class="entry-footer"></footer>
        </article>

    Regards,
    Elliott

    #575960

    Elliot,

    I imagine that change would disappear with the next theme update. So should I use a child theme, and if so, do I need to create a loop-index.php file in the child theme folder, then add specific code while removing the lines you mentioned?

    #576218

    Hi!

    Yes you can add an “includes” folder to the child theme and copy that file to it and then delete the lines there.

    Cheers!
    Elliott

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.