If you want to modify the main <header>
output take a look at header.php
. This file will be called before the other templates.
If you want to modify the template that is used to display your latest blog posts, index.php
would be the file of choice.
Index.php
is also the fallback template for any post object so you might want to let it as it is to avoid the special content being displayed on any other site.
You could conditionally hook into pre_get_posts
and do your modifications there.
You could create your own action hooks and fire them conditionally. There are many ways to achive modifications.
For Conditionals see
Related Posts:
- How to include different html tags in the header for different pages?
- How do I change/modify the_post_thumbnail(); html output?
- Change logo based on incoming domain
- Echo URL of large version of Featured Image
- add_image_size for header_image
- Responsive Header for Phone
- “imagejpeg” function is not working in wordpress
- Clickable image link sends people to wrong URL
- How to internationalize header image?
- Displaying images outside the content
- Configure WordPress to Use Responsive Image Rendering
- How to use data URL in WordPress?
- Gallery requires a featured image but does not show it in posts/pages
- Changing 2011 theme header image based on user dropdown
- HTML in PHP problem [closed]
- Load a page into a div with Ajax
- Recent posts with featured image or fallback image with permalink
- My form action url is being prepended with a directory that does not exists
- Best practice for migration friendly images in posts/pages?
- Where in PHP do I move title and meta (date) to bottom of each blog section?
- Converting HTML Template to WordPress Theme
- Set the background to a default image if there isn’t a specified “featured image”
- Multiple options not staying selected after saving
- Using the echo command adds unwanted br tags to source
- custom fields wordpress
- Mass update excerpt
- Why the JavaScript code is ignored from wp editor?
- Populate dropdown with Child Pages based on Parent Page chosen
- How to store data from multiple forms using ajax and php
- How to control WordPress image metadata (using Imagick)?
- search and replace preword from author
- Embed html in php code
- Get the post ID and display the images
- WP grandchild categories in nested ul li
- Use DOMDocument with ob_start breaks my HTML code
- Reprinting tags with all attributes
- How to change redirection route to a php page for making it only accessible by logged-in members?
- How to get next image with this code from same post?
- Unread Repeater field IMG alt not working
- Can’t upload image using media_sideload_image
- selected option if current category is the value
- Upload multiple images to a Woocomerce product
- How to use thumbnail size of image if I’m only using src to get image
- How to remove ?wp-mce-4103-20162941
- Customize position of social icons in upme plugin [closed]
- Why Won’t My Inputs in a form with a Get method work together?
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- Accessing an image folder inside public web directory
- parts of url disappear when using # inside href=”” [closed]
- get_children displaying images removed from the page
- Why is image hard cropping for one image using add_image_size not working?
- Settings API callback function inserts html quotes from nowhere
- Input data from email form not going to JSON file
- How to get the value of input hidden html from text editor to custom page template?
- Enable custom logo upload if logo is not in header
- Why my image upload button is not working in wordpress widget area?
- Different post styles depending on category
- How create a Shortcode with hover and complex options
- How do I remove the product thumbnail link from a specific div in Woocommerce? [closed]
- My php header() function is not working [closed]
- Dot is not added at the end of href
- WordPress Multiple Navigation bars
- Position banner to right of logo in header – messed up my header file
- Commenting out unwated CSS/scripts in HTML with PHP
- Scrape external webpage for first image and add it to new post
- How to make own crop image function for WordPress plugin
- Display image from an external rss feed on wordpress without plugins
- wp-comments-post.php file returns a blank page
- How to separate HTML and WordPress files
- Add .htm extention to a custom taxonomy
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Insert custom PHP head above in WP pages
- Headers already sent in Pluggable.php / homepage and wp-login error
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Is_front_page inside header.php is always returning true
- Make PHP work with HTML tags
- Does wordpress templates always in files or in database?
- WordPress automatically adds links to uploaded images
- Adding Meta Tags to a Post using its Tags, Excerpt and content
- WordPress function when file is uploaded, deleted or edited
- Noscript not working as it should in wordpress site
- Show latest posts in a plain HTML website custom widget [closed]
- How to convert select to HTML with PHP tags inside of it [closed]
- Moving code from theme header to functions.php
- Is this spyware on my site or a real Java update?
- Syntax error when I try to insert my loop into an unordered list? [closed]
- Download images from media library to computer in BULK?
- How to make modifications only to certain elements of an HTML string on the server-side?
- WordPress wp_redirect error
- Three Questions with Twenty Eleven theme
- Having Issue on Redirecting With Session in WordPress
- Wrapping a Sidebar within
- Search WordPress using static html page
- Hide HTML element (by class or ID) with PHP
- Add Codepen animation as Preloader to WordPress
- Path for php file for inserting data through html form
- Function returns text instead of html [closed]
- Printing HTML codes
- Widget back end radio button issue