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

    I’m wondering if there is some quick css I could employ to make some minor alterations to the magazine feature on this site (https://media.enduringword.com/the-book-of-revelation/)

    I’d like the posts in the magazine section to appear in the opposite order (oldest to newest), and I was wondering if I can also remove the date from being displayed?

    Thanks

    #985771

    Hey enduringword,
    I took a look at your page, but I don’t see any dates on it, and since it’s The Book of Revelation, I’m not sure you want to reverse the order?
    Perhaps I’m looking at the wrong page, please advise.

    Best regards,
    Mike

    #986124

    Hey Mike .. thanks for your response. I should have come back and updated this. I did tinker around with it and figured out how to remove the date from the magazine using the following quick css…

    .av-magazine-time { display: none !important; }

    Then I went in and edited the magazine.php and chanced the sorting from DESC to ASC. But I’m wondering if there is a quick CSS code to do this also? My concern is that when I update the Enfold theme in the future it will replace the magazine.php file and revert back to DESC instead of my alteration.

    #986225

    Hi,
    To sort the magazine element, Please try adding this code to the end of your functions.php file in Appearance > Editor:

    add_filter('avf_magazine_entries_query', 'avf_magazine_entries_custom_query');
    
    function avf_magazine_entries_custom_query ( $query ) {
    $query['orderby'] = 'date';
    $query['order'] = 'DESC';
    return $query;
    }
    

    If you wish to edit other aspects of the file, you can add the modified file to your child theme by creating the shortcodes folder and add this code in your functions.php

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths){
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }

    Best regards,
    Mike

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