display CPT next to post title

Home Forums Product Support Forums Ajax Search Pro for WordPress Support display CPT next to post title

This topic contains 11 replies, has 2 voices, and was last updated by

 
Keymaster
1 year, 5 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #28698

    Participant

    Hello

    Can you advise the if there’s any Advanced Title Field so i can display CPT name next to the Title?

    For example:

    Post – ABC
    Book – ABC

    #28710

    Hi,

    This knowledge base will help. There is no option, but a small custom code snippet.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28723

    Participant
    You cannot access this content.
    #28728

    Sorry, there was an error in that code, please use this one:

    add_filter( 'asp_results', 'asp_show_the_post_type', 10, 1 );
    function asp_show_the_post_type( $results ) {
      foreach ($results as $k=>&$r) {
    		if ( isset($r->post_type) ) {
    			// Modify the post title
    			$r->title = get_post_type( $r->id ) . ' - ' . $r->title;
    		}
      }
    
      return $results;
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28731

    Participant
    You cannot access this content.
    #28732

    You are welcome.

    This documentation should help!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28851

    Participant
    You cannot access this content.
    #28871

    Hi,

    Some product attributes might be custom fields, other can be taxonomy terms. Enabling the search in taxonomy terms feature will help then.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28891

    Participant
    You cannot access this content.
    #28904

    I see a few single character words in the terms, and I think changing this option may help: https://i.imgur.com/aTBmNXK.png

    If no change, can you please add temporary back-end and FTP access, so I can check the issue? Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #29044

    Participant
    You cannot access this content.
    #29063
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.