WordPress.org

Ready to get started?Download WordPress

Forums

Question and Answer Forum
How to remove ?post_type=question from url (5 posts)

  1. Vlad
    Member
    Posted 1 year ago #

    How to remove ?post_type=question from url.
    For example i have link structure to display posts from single category like this:
    http://sitename.com/category/the-category-name/?post_type=question

    is it any way to remove ?post_type=question from the end of link?

    Thank you!

    http://wordpress.org/extend/plugins/question-and-answer-forum/

  2. ajay.shukla@w3care.com
    Member
    Posted 1 year ago #

    hello dstZloi,
    I am also looking for the solution of removing the '?post_type=question' from url. Please do reply.

  3. Vlad
    Member
    Posted 1 year ago #

    I didn't find the solution (

  4. ajay.shukla@w3care.com
    Member
    Posted 1 year ago #

    I found the solution but it creates pagination problem.
    Here the solution
    $args = array(
    'posts_per_page' => '',
    'cat' => $cat,
    'post_type' => array( 'post', 'page', 'custom_posttype')
    );
    query_posts($args);

  5. Callum Macdonald
    Member
    Posted 1 year ago #

    I found this thread searching for a similar issue. I posted my eventual solution here:
    http://wordpress.org/support/topic/removing-post_typefoo-from-the-url-for-custom-taxonomies

    Hope it helps somebody else stumbling upon this thread trying to remove ?post_type=blah from their urls.

    Love & joy - Callum.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic