Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #676717

    Lely
    Moderator

    Hello There,

    Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    #679337

    ReapHit
    Participant

    Hello, Thank you for your response.

    I am very sorry not to have been quite understandable. Google translation is sometimes an enemy. I’ll try to be more specific.

    I have on my website, your integrated search tool. (magnifying glass, located at the top right of my homepage, integrated menu -.> http://reaphit.com)

    I do not use archiving planned for the theme. So I create my own category pages. I wish that when I click on the “…” in the bottom of my category pages (http://reaphit.com/wp-content/uploads/2015/11/Capture-d’écran-2015-11-25-à-20.27.51.png), I arrive directly on the search page (here: http://reaphit.com/wp-content/uploads/2015/11/Capture-d’écran-2015-11-25-à-20.26.31.png).

    Please tell me that I was quite understandable.
    Thank you for your patience.

    #679509

    Lely
    Moderator

    Hello There,

    Thank you for the clarification.
    Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. Although, I can point you to the template that you need to customize: your-wordpress-folder\wp-content\themes\x\framework\functions\global\pagination.php. If you’re not comfortable doing the updates yourself, you may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!

    #778763

    venya
    Participant

    Hello!
    I’m making progress on the site but still am stuck on getting my product subtitle to appear in search results. My understanding is that Xtheme doesn’t have any individual .php pages for search, so changes would have to be made to functions.php.

    I’m using a plug for the custom field, and realize you can’t usually help there, but good news is that I managed to get the subtitle to appear in CART with the following code:

    function kia_subtitle_for_woocommerce_products( $title, $product ){
    if( function_exists( ‘get_the_subtitle’ ) && $subtitle = get_the_subtitle( $product->id ) ){
    $title .= ‘<div class=”subtitlecart”>’ . $subtitle . ‘</div>’;
    }
    return $title;
    }
    add_filter( ‘woocommerce_product_title’, ‘kia_subtitle_for_woocommerce_products’, 10, 2 );

    I am hoping this code can be slightly tweaked to help me display the subtitle below product title in the search results.

    Hope you can help. Thanks so much!

    #778765

    venya
    Participant
    This reply has been marked as private.
    #779268

    Zeshan
    Member

    Hi Venya,

    Thanks for writing in!

    While this is outside the scope of support, I could point you in the right direction with the understanding that it would ultimately be your responsibility to take it from here.

    Try adding following code in your child theme’s functions.php file:

    function kia_subtitle_for_woocommerce_products_title( $title, $product ){
    
      if ( is_search() && get_post_type() === 'product' ) {
        GLOBAL $product;
        if( function_exists( 'get_the_subtitle' ) && $subtitle = get_the_subtitle( $product->id ) ){
          $title .= '<div class="subtitlecart">' . $subtitle . '</div>';
        }
      }
    
      return $title;
    }
    add_filter( 'the_title', 'kia_subtitle_for_woocommerce_products_title', 10, 2 );
    

    It’s a separate code from your previous one, so add it below that.

    Thank you!

    #780357

    venya
    Participant

    It worked! Thank you!

    You guys are fantastic and true professionals!

    #780960

    Lely
    Moderator

    You’re welcome!

    Always,
    X