Add Elementor-ready HTML Codex-inspired news theme - #3
Add Elementor-ready HTML Codex-inspired news theme#3journalist-prashant-tiwari wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8d6eddc15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,24 @@ | |||
| <?php get_header(); ?> | |||
| <main> | |||
There was a problem hiding this comment.
Render page content from the front-page template
When a static homepage is assigned and the provided Elementor template is imported into that page, WordPress selects this front-page.php; because the template starts hard-coded markup and never runs the Loop or calls the_content(), Elementor's rendered page content is never printed, so the advertised Elementor-editable homepage cannot actually be edited from WordPress.
Useful? React with 👍 / 👎.
| @@ -0,0 +1,3 @@ | |||
| <?php | |||
| /** Main template fallback. */ | |||
| get_template_part('front-page'); | |||
There was a problem hiding this comment.
Run the Loop in the index fallback
For any request that falls through to index.php in this theme, such as single posts, ordinary pages, archives, or search results when no more specific template exists, this delegates to the homepage template instead of rendering the queried content. That means published posts and Elementor-enabled pages render the hard-coded home layout rather than their actual content, so index.php needs a normal Loop/the_content() fallback or dedicated templates.
Useful? React with 👍 / 👎.
Motivation
Description
style.csscontaining theme metadata and the responsive CSS tokens and components used across the layout.functions.phpto register theme features (title-tag, thumbnails,custom-logo,align-wide,responsive-embeds), enqueue the stylesheet, and enable Elementor support for pages and posts.header.php,footer.php,front-page.php, andindex.phpimplementing topbar, navigation (with fallback menu), breaking news, hero cards, news list, sidebar, newsletter CTA, and footer.elementor-template/newsroom-homepage.jsonas an importable Elementor starter template for the homepage structure.Testing
for f in *.php; do php -l "$f"; donewhich reported no syntax errors.python3 -m json.tool elementor-template/newsroom-homepage.jsonwhich parsed successfully.git diff --checkas a repository lint check which reported no issues.Codex Task