Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9236321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:15:50+00:00 2026-06-18T07:15:50+00:00

I am using wordpress for my next CMS project. Say I have a page

  • 0

I am using wordpress for my next CMS project. Say I have a page template (full width page template) but the pages under that template have certain parts that are in one page but not in another . I am not talking about the content, the content comes from wordpress. I am talking about some specific parts of pages (say some images) which may be in one page but not in another . However the pages are under the same template.

I could accomplish it by creating separate templates for every such page, but that wont be appropriate.

In my last template, I used the ID of the current page/post to hide and display such contents for those particular pages/posts, But when the page is deleted and added again, all of my code would be meaningless because my code couldnot match the new ID.

I was thinking about doing it by matching the name of the page instead of ID, but when I use the_title() to compare, it displays the title because the nature of the_title() function is to display the title. How can I use it to compare the title?

if(the_title() == "home"){
   //show the content for home page
}

Is there any other appropriate way to accomplish the thing that I want ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:15:52+00:00Added an answer on June 18, 2026 at 7:15 am

    Use get_the_title instead:

    if (get_the_title() == "home") {
       //show the content for home page
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a Wordpress site that loads pages dynamically using the .load function.
I just started out using wordpress as a CMS. On the site I have
I am using WordPress on RHEL6, and have some rewrites so that CSS is
I'm using the wp_list_bookmarks() function in wordpress to get links that have been added
I'm using CodeIgniter next to a Wordpress install. So, I've got this site that
I have an admin page for a WordPress plugin that, thanks to the stackoverflow
I have set up a site using Wordpress as my CMS. I am using
I'm using a WordPress template that has a jQuery carousel on the homepage and
I am getting next page on my wordpress blog using jquery, finding the desired
Using Wordpress.. I would like to redirect to a certain page on the site

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.