WordPress.org

Ready to get started?Download WordPress

Forums

[closed] get_page_by_title() not working with ampersands (1 post)

  1. wpelvis
    Member
    Posted 2 years ago #

    Hi
    I am trying to match up some categories and pages with this code:

    //get the title of the post
    $thispage = single_cat_title('',false);
    //get the page of the same title
    $page = get_page_by_title($thispage) ;

    However get_page_by_title() doesn't seem to work if the post title has ampersands in it. I have tried escaping etc but that doesn't seem to work.
    Does anyone know of a way to make this work?

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic