You can also doe like below code snippet:
$flag=0;
$args = array(
'orderby' => 'title',
'order' => 'DESC',);
$query = new WP_Query( $args );
while ( $query->have_posts() ) {
{
the_post();
if($flag==0)
{
// you first post's title, content etc
$flag=1;
}
else
{
//rest of your post's title, sidebar, etc
}
}
Related Posts:
- What is the preferred way to add custom javascript files to the site?
- Change admin bar to default:off
- Should I use set_transient or update_option?
- Custom Taxonomy Tree view
- What would happen if the admin installs a plugin when the plugin is included in the theme?
- Add a preview to a WordPress Control Panel
- Change text of twentyseventeen_edit_link()
- How do I get my child-theme to work with my theme’s includes folder?
- wp_insert_post breaks rewrite rules
- Where can I find a good reviewed collection of Twenty Ten child themes?
- How do I remove RSS feeds from themes?
- Template Hierarchy for get_header()
- How to add (css) classes to only one wp_nav_menu()?
- Advantages of using instead of wp_enqueue_style()?
- Style.css redirects to 404 Page not found
- How to add suggest plugin to theme?
- When developing a distributable Theme, does it HAVE to be “inheritable”?
- how do I get a sidebar’s id or number for use with is_active_sidebar()
- Looking for the code in twentyten that allows users to select images for the header/banner
- Relative Time On Posts
- Prevent update check for specific theme
- using wordpress without javascript
- Theme Check: Could not find post_class
- Unhook jQuery from WooCommerce via `functions.php`? [closed]
- Set a static front-page as a landing page programmatically
- WP 3.1 upgrade breaks AutoFocus+ theme
- Comment entry screen shows even though “Allow Comments” is unchecked
- How can I display/hide certain content based on a Theme Option field?
- Custom WordPress Theme – Search not working on posts
- How can I make that when I clic on one of the menu items, that page shows only posts with the same category?
- Hide header texts (Title & Tagline) in custom-header.php
- Why an arugment is missing in wp_get_attachment_image_attributes?
- Archive page doesn’t work
- Where to hook settings api init
- How to add “Template” option in page attributes panel?
- defining a folder location in order to recall it
- How can I detect hierarchal relationships beyond children (grandchild, great-grandchild, etc)?
- How to enable thumbnails in RSS dashboard widget
- How can i attach the attachment-ID to the user profile image?
- JavaScript stops working on selectively refreshed sections one inside the other
- How can I fetch the WordPress cart errors normally displayed in woocommerce-error?
- Remove settings if theme is deleted?
- Custom Blocks as part of a theme
- How to set up diffrent mobile theme for single site in WordPress?
- what is the difference between uri and path?
- Enqueued JavaScript is not working
- Derive child theme from separate theme
- How to change footer or for different kinds of users in wordpress?
- How to Download Minimum Requirement of WordPress (Not Themes )
- Create a child theme from multiple themes
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- How to determine (via php) if site is using a static home page?
- Migrating to WordPress – but how will it do “structured” data?
- How to fix : Uncaught ArgumentCountError: Too few arguments to function? [closed]
- I have WordPress setup on primary domain, how do I set it up on its subdomain using the same database?
- Theme development – Automatically menu creation
- What is the best way to build home pages with a lot of sections for distributable themes [closed]
- How to generate a hierarchical list of all pages and child-pages using a regular query?
- Should is_active_sidebar() always be used around dynamic_sidebar()?
- pre_get_comments or the_content filter
- using part of a theme in another theme
- Only the latest post shows up on post page?
- WordPress pulling in random page themes
- Trouble in enquing all js files under certain directory
- Can’t change theme name
- Pagination: Keep prev and next link even on the first/ last page
- How to remove permalinks links presents in each page of my site?
- Stop WordPress from showing images on non post pages
- Is there a way to serve different resolution images to different devices?
- How to substitute old wordpress menu by wp 3 menu the right way?
- Why my theme option not working?
- enqueuing external and internal js and css in wordpress did not work with owl.js animate.css
- Catch the moment when theme is deleted
- Attribute form NumberControl doesn’t update when I update page before it lose its focus
- Next and previous post link shows error in first and last post
- create loop for the_content()
- how to change footer content for certain pages only
- use a single nonce in three different nonce field
- Theme is Enqueueing Everything in Footer
- Should I use template files or just use conditional tags in index.php?
- Media & Plugin screens stall
- wp_kses allow checkbox class and checked
- Is wp_mail plugin territory?
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- How do I remove p tag *insertions*? Disabling `wpautop` removes manual tags
- Create a variable with string, array or multiple values
- How can I include the js and css file of my custom theme dynamically in header.php
- WordPress Blog Page displaying nothing
- Full width thumbnail
- What hook to use for loading a custom class extension during Theme initialization?
- Set start page depending on screen width [closed]
- How can I change the title of the Home link in the navigation bar?
- Use external fonts in WordPress stylesheet
- Custom link color or stylesheets
- What is the advantage of using home.php over index.php for the front page
- Add option for administrator to submit link
- My wordpress site memory exhausted more than 1GB trying to debug with default
- Display first post on each page differently than the others
- Custom Theme functions.php – Using add_settings_field and input type=”file” to set custom logo
- Image and font support missing in editor when deploying theme remotely