Looks like WP is using HTML entity encoding on the special characters, you need to parse the title using the html_entity_decode()
function like so.
$title = html_entity_decode(get_the_title($result->post_id));
if ( 0 === post_exists( $title ) ) {
$title="Document Id: ".$result->post_id .' (Deleted)';
}
I am not sure if the post exists function decodes the characters but I am going to assume it does, let me know if you are still getting a 0 though
Comment below any questions!
Related Posts:
- How to place POST TITLE any location inside the posts page
- why adds ‘»’ symbol?
- Automated Footer information
- Theme support title tag – how to replace the default WP separator (with a filter)?
- WordPress Load Only Page Text
- When trying to set title, not sure how to edit it for different pages
- double page title [duplicate]
- Is wp_is_mobile() effective?
- Display Menu Name using wp_nav_menu
- What questions do you ask when asked to give an estimate on theme development?
- How to remove dashicons.min.css from frontend?
- What’s the difference between home.php and index.php?
- get_template_part vs action hooks in themes
- how can I add an icon/image for a child theme?
- Caching and Versioning for rtl.css
- Getting instance variable in scope of ‘wp_enqueue_scripts’
- How to change admin bar color scheme in MP6 / WP 3.8 front end?
- Google Maps not displaying in wordpress using Google Maps Javascript API
- When to use esc_url, esc_html, esc_attr, and friends?
- Hide certain pages / posts on wp-admin, show custom filter
- What is the purpose of an extra file for translation?
- Problem with registering menus – What to do when other solutions aren’t working?
- How to enqueue scripts and styles only when there are needed?
- Unexpected width and srcset attributes for the_post_thumbnail();
- add_theme_support(‘my-custom-feature’)
- The best way to add stylesheets to WordPress
- Displaying wp menus by name without using theme locations
- Adding dashicon fonts to the admin of pre 3.8 installs
- How to add dynamic inline style?
- Optimal solution to develop a wordpress theme?
- Change display of featured image for pages in twenty seventeen theme
- Do I really need the div class entry?
- How to manipulate “add media” pop-up
- WordPress Gutenberg Theme: Structure, Hierarchy and Custom Templates
- How to Take Ownership of a Theme
- Best way to start becoming a wordpress developer
- Why wp_head() function not loading style.css?
- How to make content editable from admin page?
- Custom shortcodes not working using __s theme
- Redirect Old .php URLs to New WordPress Page
- Widget items disappearing
- Add submenus to Theme options menu
- create-guten-block in wordpress theme?
- WordPress navbar with logo in middle [closed]
- How to add new args data in $wp_customize->add_setting?
- Events Made Easy Plugin – Duplicate Title Tags
- wp_post->post_parent object returning 0
- Is the current Theme version number cached somewhere?
- PHP Template way of coding for wordpress theme development
- display menu with out list tags
- Custom form in theme template displaying internal server error upon submission
- Permanently activate WordPress theme
- Admin: sub menu doesnt display under apperance when activate my themes
- Get data from style.css file and from from users->your profile
- Getting Different Size Of Attachment Images
- 2 loops, is_home won’t work, count is off
- how to remove the gallery shortcode in wordpress?
- Exclude custom post type from search conflict with get_posts
- How to obfuscate theme directory URLs
- Remove specific published page when theme deactivated
- Is there Photo Categories?
- Post and page content not displaying in search results
- Why still output /wp-content/themes/twentynineteen?
- WordPress does not load page template or anything else, just empty page with header and footer
- add shortcode support in customizer
- How to make my themes compatible with different WordPress versions?
- Templates dropdown not appearing using _s theme (underscores)
- add jquery file if a certain page is included
- Exclude subcategory from wp_query
- Some doubts about WordPress handle the horizontal main menu visualization
- How To Display Value from Theme Options Field in Front End Template?
- Changing footer depending on URL (poli language site)
- Custom search template is showing 404 when adding query string
- How do I restructure the comment HTML layout?
- How to set a custom URL for the iframe in the customize page
- Cart displayed above header
- How to render block editor in wp-admin custom pages programmatically
- Post Featured Image Custom Sizing?
- Fetch data from database with dropdown selected option
- Theme: dropdown hover menu not showing up in IE/Edge
- How to Show Next, Previous, and Page Numbers with wp_link_pages
- how to ensure responsiveness in wp themes? [closed]
- Let user publish posts on community page
- How to perform str_replace on the results of wp_list_pages
- Activating theme in local MAMP installation results in HTTP ERROR 500
- How would I get this to work – send to post from thick box
- Safe way to echo wp_trim_words
- Show category and description
- How can I demonstrate themes well?
- Support Multiple featured images
- trying to figure out how to use more that one image upload in the same section in theme customizer
- WordPress custom jquery not found
- How to using custom DB tables
- Programatically add a page in WordPress
- How to highlight current menu bar base on the URL?
- Title displaying multiple times
- Replacing static code in a template file with a sidebar and widgets?
- How to remove proudly created by WordPress in theme?
- How to load custom php file in WordPress themes
- Roll my own theme or customize an existing one [closed]