Add Akshant News Pro WordPress theme starter and plugins guide - #2
Add Akshant News Pro WordPress theme starter and plugins guide#2journalist-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: d5dcdbf271
ℹ️ 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".
| <h2 class="section-title">ताज़ा खबरें</h2> | ||
| <section class="two-col"> | ||
| <?php | ||
| $latest = new WP_Query(['posts_per_page' => 6, 'offset' => 6]); |
There was a problem hiding this comment.
Ignore sticky posts in the third homepage query
The "latest" section query omits ignore_sticky_posts, while the hero and side queries explicitly set it to true. When a site has sticky posts, WordPress re-injects them at the top of this third query, which can duplicate stories already shown above and make the offset skip the wrong non-sticky posts. Add ignore_sticky_posts => true here to keep homepage sections consistent and non-overlapping.
Useful? React with 👍 / 👎.
| 'theme_location' => 'primary', | ||
| 'container' => false, | ||
| 'fallback_cb' => function() { | ||
| echo '<ul><li><a href="#">होम</a></li><li><a href="#">देश</a></li><li><a href="#">राज्य</a></li><li><a href="#">खेल</a></li><li><a href="#">मनोरंजन</a></li></ul>'; |
There was a problem hiding this comment.
Provide a functional fallback navigation menu
If no menu is assigned to primary (the default right after theme activation), the fallback outputs links with href="#", so every item is a dead link and main navigation is effectively broken until manual setup. A fallback should route to real pages (e.g., wp_page_menu) or be disabled, rather than rendering nonfunctional links.
Useful? React with 👍 / 👎.
Motivation
Description
wp-content/themes/akshant-newsincludingstyle.csswith theme metadata and responsive styles.functions.phpto register theme supports, aprimarymenu, enqueue stylesheet/assets/js/main.js, and register a homepage widget area.header.php,footer.php,front-page.php,index.php, andsingle.phpimplementing the homepage layout, post listing, and single post view.assets/js/main.jsas a placeholder andREADME.mddocumenting setup steps and recommended plugins.Testing
php -lacross the theme PHP templates (wp-content/themes/akshant-news/*.php) and the command reported no syntax errors.Codex Task