Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

A

ale

@ale
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Overriding news.php in Child Theme for Future Scheduled News Posts
    A ale

    Hey Armin,

    Thanks a lot for taking the time to reply – really appreciate it!

    In the end, I actually found a different workaround that didn’t require digging too deep into the theme. I ended up not using the news feature for events at all. Instead, I just listed all the events as text fields on one overview page and used a bit of custom JavaScript to sort them by date on the frontend.
    This does the job and keeps everything update-friendly.

    Also, I really appreciate your offer to implement a filter or even help with more involved customizations – that's super generous and good to know for the future!

    Thanks again and all the best!

    General Discussion

  • Overriding news.php in Child Theme for Future Scheduled News Posts
    A ale

    Hi everyone,

    I'm currently working on creating a child theme for Laytheme. I have successfully set up my child theme with its own style.css, functions.php, and header.php. However, I'm encountering an issue with overriding the "news" functionality.

    I use the news element as a kind of calendar to display events, and I need the events to be sorted by date, including future-scheduled posts (currently, only published posts are shown). I've modified the query in news.php to include future posts by changing the query parameter from:

    'post_status' => 'publish',

    to:

    'post_status' => array('publish', 'future'),

    and I also implemented a custom sorting function to order the events by date. However, despite copying the entire /news folder (with my modified news.php) into my child theme using the same folder structure, my changes don't seem to take effect—the parent theme’s version of news.php is still being loaded.

    It appears that the parent theme includes the file using a direct require call like this:

    require get_template_directory() . '/news/news.php';

    I have read several times that Laytheme might not be fully designed with child themes in mind, which could be causing this issue. I’m looking for a method to override news.php in a child theme without modifying the parent theme’s files directly. Or maybe I am overcomplicating things and there is a much easier way to achieve what I am looking for.

    Has anyone encountered this issue or found a solution to ensure that future-scheduled news posts are displayed and sorted by date while using a child theme? Any help or suggestions would be greatly appreciated.

    Thanks in advance!

    General Discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Search