Perhaps when you removed your a tag you also remove the nested the_title();
function?
the_title();
is the WordPress function which spits out the plain text post/page title so having that in your h1 like below should get you the results you’re expecting. Of course there may also be some CSS which is affected due to the removal of your <a>
tag
<h1 class="post-title <?php echo $titleClass; ?>">
<?php the_title(); ?>
</h1>
Related Posts:
- Change separators in HTML tags
- How to display post title & excerpt when mouse hovers on an image?
- Replace “WordPress” word in title of Dashboard
- Custom title, Bones theme
- Get Image from Media Library with the Title
- Get rid of title from static front page
- Set Title from Custom Template
- Save title as custom field on custom post type
- Keep Title and Description always
- How do I modify the size of the text in my page titles?
- How to add span on WordPress Title for first and third word
- Replace a ‘Title’ tag with a Custom Field
- title tag function
- How to get the full product name by ignoring custom modification on it
- Need to replace some text string on a title
- Delete page titles
- Change meta-box title- “LearnDash Quiz Settings” to “Quiz Settings”
- I need to make the title of the page dynamic in my custom plugin
- Running Gutenberg React in Development Mode
- Is there a blank theme framework compatible with WP 3.0? [closed]
- Plugin SVN & update API – how are plugins identified?
- How to use more than 256MB of memory in the admin?
- Check for and enforce unique value in user-entered custom meta field in WP Admin
- Custom Search Query
- Removing fields from the Media Uploader/Gallery
- Managing Images for a WordPress Blog: Picasa or Flickr?
- When using the block.getSaveElement hook can you output different markup based on whether or not you are in the edit view or the live page view?
- Selecting An image from the Media LIbrary on the frontend
- WordPress audio player has two different styles
- How wp_ajax_nopriv since WordPress 3.1
- Set user loggin status?
- Intercept invalid email during lost_password
- Only append custom classes to nav menu items
- redirect product-category to a custom page
- custom headers for static home page and posts page
- WP-Admin gives 403 Forbidden after login on CentOS 7
- Custom Taxonomy Archive not displaying entries
- How to redirect WooCommerce shop URL?
- Best way to implement a thumbnail-based gallery in WordPress?
- Why is my mod_rewrite not working?
- Show posts on a page based on a category and tag(s)
- Any tools for quickly grabbing comments / comment count?
- Custom WP_Query with no posts to output
- How to remove buttons from the WP Editor on the edit post page in the admin area
- Adding Page Attributes and Page Templates to Custom Post Type WP 4.7.3
- How to remove the search fields in Twentytwelve
- WordPress Locale Switching on Accept-Language Header
- syntax highlighting for theme-editor.php?
- adding homework to a school’s website
- How do I call in a category title on a category page in a child theme?
- Include custom JS without child theme
- Prepopulating a specific page template with HTML/CSS
- Custom Log In Screen – Disable password recovery [duplicate]
- How to get every custom taxonomy names and urls?
- Two description meta tags All in One SEO WordPress [closed]
- Is there a way to by-pass the pagination function on one custom template?
- Create page as a file in my theme?
- Changes in my child theme from customizer not appearing in style.css?
- Search URL parameters query [duplicate]
- Custom SELECT Query With Multiple Meta Values (Ordering Problem)
- Change Successful password reset message
- Changing the the_author_posts_link() hover title
- How I can directly add drop-down in my product on shop page as show in below image
- How do I hide an article element so only logged out users see it
- How to display page ids as page slug names?
- How to add custom ‘layout’ buttons to wordpress editor?
- How to request container_class from wp_nav_menu
- How to load a mycred hook from a plugin?
- toggle Multiple Loop with tittle
- Showing Meta Box via Jquery Checkbox
- problem saving/ retrieving custom meta with wp alchemy metabox
- How To make Custom page of every Category
- Problem with custom function from jQuery slider tutorial
- How to style bootstrap container in WordPress?
- Problems with setting up a subdomain to serve images and scripts
- Change login cookie expiration time?
- Disable “-mp4-image” screenshots from appearing in Media?
- Post filter with multiple checkbox taxonomy terms
- Altered Media Library URLs
- generate a static copy of the website footer html
- Multi-site customization
- Admin menu disable new/delete page
- Show different pages on site depending on user choice
- Is there a way to limit multi upload in media upload box?
- Use another theme template in my theme
- How to loop through 1 CPT with 2 Taxonomies
- Pulling posts into static site (wordpress as subdirectory)
- Call a duplicate registration form with other url
- How to support extra color options for shortcodes?
- retrieve theme custom settings
- WP Customizer – what types of fields is it capable of supporting?
- How to make my wordpress site responds for 2 domains
- pull custom fields values from wp-database in a nested foreach loop
- Pass query param to custom page
- Deleting first four characters from all Post Titles
- How to answer, and we aren’t using WordPress to manage your site? [closed]
- How to create a shortcode with HTML code in it and custom parameters/
- responsive screen not working [closed]
- Background image no more visible in the preview
- Custom CSS working on home page but not on NEW created PAGE