Skip to content

Add Elementor-ready HTML Codex-inspired news theme - #3

Open
journalist-prashant-tiwari wants to merge 1 commit into
mainfrom
codex/clone-html-site-to-elementor
Open

Add Elementor-ready HTML Codex-inspired news theme#3
journalist-prashant-tiwari wants to merge 1 commit into
mainfrom
codex/clone-html-site-to-elementor

Conversation

@journalist-prashant-tiwari

Copy link
Copy Markdown
Owner

Motivation

  • Provide a WordPress theme that reproduces the HTML Codex news/magazine demo as an Elementor-editable, responsive homepage and site scaffold.

Description

  • Added style.css containing theme metadata and the responsive CSS tokens and components used across the layout.
  • Added functions.php to register theme features (title-tag, thumbnails, custom-logo, align-wide, responsive-embeds), enqueue the stylesheet, and enable Elementor support for pages and posts.
  • Added templates header.php, footer.php, front-page.php, and index.php implementing topbar, navigation (with fallback menu), breaking news, hero cards, news list, sidebar, newsletter CTA, and footer.
  • Added elementor-template/newsroom-homepage.json as an importable Elementor starter template for the homepage structure.

Testing

  • Ran PHP syntax checks with for f in *.php; do php -l "$f"; done which reported no syntax errors.
  • Validated the Elementor JSON with python3 -m json.tool elementor-template/newsroom-homepage.json which parsed successfully.
  • Executed git diff --check as a repository lint check which reported no issues.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread front-page.php
@@ -0,0 +1,24 @@
<?php get_header(); ?>
<main>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread index.php
@@ -0,0 +1,3 @@
<?php
/** Main template fallback. */
get_template_part('front-page');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant