As i see your code in header.php and index.php looking messy (because of many if
conditions).
If i’m understanding your problem then i do it like this
- create separate author.php for both authors their name like
author-cait.php
andauthor-shannons.php
- Give link like
http://www.yousite.com/author/cait/
to button on static landing page.When user click on this,it takes him to author’s specificauthor.php
if exist - create custom header.php for both authors name like
header-cait.php
andheader-shannons.php
- create custom sidebar.php for both authors name like
sidebar-cait.php
andsidebar-shannons.php
- complete your code in author specific author.php for example
author-cait.php
contain only cait’s conditon,header and sidebar.
It makes your code looking beatiful,manageable, save from overloding of if
conditions.
Related Posts:
- Change Author Name to Sitename on Frontend
- Prevent 404 of Author pages without posts
- how to show all type of author posts in author page (SOLVED)
- Get current menu_order
- the_author() returns empty string
- get_children() Not Working with orderby Parameter
- Post/Page Publish/Update button not clickable once I make an edit
- Custom Field in Featured image for A particular post
- How to show list of posts by author and category?
- How to display posts by current user/author in a custom page template?
- Is there a WordPress equivalent to MediaWiki templates
- Search posts by post author name
- Getting an alphabetic post list with two letters onclick on letter
- Find most recent authors
- Show author post count in sidebar – Variable
- Get the author of the latest revision
- Is it possible to show a different WP menu when using password protected pages?
- Multiple loops in same page, without duplicate content
- why does HTML Tag not working in Post and Page
- problem to delete page
- Redirect before post page
- $post object is null
- Is there any WordPress alternative to Book module of Drupal?
- Convert a complex webpage into WP theme
- How can I link a CSS file only on single posts?
- Single post as homepage?
- Should a photo gallery be in a post or on a page?
- Auto “expire” all of an authors posts on spcific date
- How to get the user meta data for a post?
- How can I show many posts an author has per week?
- How can I pass the ID of a post to a page template by clicking a url?
- Why aren’t my posts/pages showing up in my WordPress Theme?
- Whitelist Author of Private Post
- Adding buttons to Add New Post and Add New Page
- 301 (static page instead latest posts)
- Static posts page with home.php
- Posts vs Pages and categories
- How to dynamically parse and transform post/page content before displaying it?
- Conditional Tag for has post [closed]
- Display author’s name and avatar in post’s sidebar
- is_page Funtion for Posts ?
- Why won’t pagination work?
- WordPress Query Posts From Category Post on Static Page
- How to add some html formated text to every new post in WordPress
- Is it possible to lock all new and existing WordPress posts to one specific author?
- Intercept page request and add value to it
- get_children returns older images
- Posts and Pages: 404 Page not found
- Restrict displaying posts to the poster itself (in Back-end)
- Detecting current page from class method
- How can I set a maximum allowed post size and number of posts submitted?
- Are post, page and category IDs unique to each other?
- Showing recent post of category in page
- Author Avatar as default first image
- Create a frontpage.php and static page template
- Have posts included on a page that share same category
- Preview page/post revisions without overwriting current content
- Link from Post to Another Post Via Clicking on Words within Original Post
- show div only if have a related post inside
- Link to older links
- How to show next/prev link, when it’s not active?
- What would causes search to return incorrect results?
- Cannot publish posts, but can create new pages
- Can I restore restore content from old Worpress site to a new Worpress site from an archive
- How Do I Redirect WordPress Pages but not posts?
- Edit post & page option does not display on latest wordpress
- Custom Fields – How to get the list of a specific active widget each time it rendered
- Author post count in category
- How to show only homepage in google results instead of privacy, contact pages
- Google indexing duplicate page content with Page #### in post title and /page-2 in permalink instead of the ones I set
- Add CSS and JS files of the template post on a WordPress page
- Can’t find webpage on All Pages or All Post menus
- Display post by Random Authors on Page Refresh
- Show post count in custom taxonomy page
- How to show WP admin edit page within template page/post?
- What permissions does a role need for the user to be assigned as the author of a post?
- Display all tags even if they are not assigned to a post
- how to put post customized in page
- Show code only on WooCommerce Pages
- Multiple Pages – Seperate blogs
- Category URL to use same string as Post URL Permalink
- Posts on Sidebar only
- Posts are not showing up on next page.
- Need help with hiding an image within a post in a category
- How to give priority to page than to posts permalink structure?
- Hide Admin posts & pages in Dashboard
- structure of posts and pages
- Display only current page -> posts tags in page
- How to mix pages and sub-categories in a url
- Make a custom URL and link to custom Template
- How to get single post by one author?
- How to Post to Specific Pages?
- associate posts to a page
- Woocommerce – custom post type of checkout page
- Posts and pages not getting published
- How to have more post in a page than in your home page
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- Cannot Create a new Post [closed]
- How can I use wp_after_insert_post with $current_screen?
- Automatically search and replace link in content (pages/posts)?