This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • in reply to: Shortcode in customfield soes not show up in results #21965
    ckworldckworld
    Participant

    Thanks again, GREAT SUPPORT

    in reply to: Shortcode in customfield soes not show up in results #21960
    ckworldckworld
    Participant

    Worked like a charm, THANKS !

    in reply to: Shortcode in customfield soes not show up in results #21955
    ckworldckworld
    Participant

    SORRY, IT DID WORK, just mistyped something.

    Now how can I style the custom field results, for instance bold or difefrent color

    in reply to: Shortcode in customfield soes not show up in results #21953
    ckworldckworld
    Participant

    No that does not work, neither of the shortcodes show up.

    I think I need an extra (different) code for the second custom field

    • This reply was modified 7 years, 2 months ago by ckworldckworld.
    in reply to: Shortcode in customfield soes not show up in results #21947
    ckworldckworld
    Participant

    I just had to remove {pricemonth} from the Advanced Description Field.

    Two more questions:
    1.] The shortcode shows fine, but now I have no control over where it shows up in the results box. I am fine with the placement now, but interested to know how to let it show elsewhere, for instance right in the box etc.

    2.] I would like to put another shortcode ( availability ) in an other customfield. I tried the same code you provided with another extra custom field name, that does not work.

    I tried this, but then it only shows the second customfield
    —–
    add_filter( ‘asp_results’, ‘asp_custom_field_to_results’, 10, 1 );
    function asp_custom_field_to_results( $results ) {
    $custom_field = ‘pricemonth’; // Enter the first custom field name
    $custom_field = ‘availability’; // Enter the second custom field name

    $field = ‘content’; // ‘title’ or ‘content’
    $position = ‘before’; // ‘before’ or ‘after’
    $delimiter = ‘ ‘; // character between the field value and the field

    foreach ($results as $k=>&$r) {
    if ($r->content_type != ‘pagepost’) continue;
    if ( function_exists(‘get_field’) )
    $meta_value = get_field( $r->id, $custom_field, true ); // ACF support
    else
    $meta_value = get_post_meta( $r->id, $custom_field, true );
    $meta_value = do_shortcode($meta_value);
    // Modify the post title to add the meta value
    if ( !empty($meta_value) ) {
    if ( $field == ‘title’ ) {
    if ( $position == ‘before’ )
    $r->title = $meta_value . $delimiter . $r->title;
    else
    $r->title .= $delimiter . $meta_value;
    } else {
    if ( $position == ‘before’ )
    $r->content = $meta_value . $delimiter . $r->content;
    else
    $r->content .= $delimiter . $meta_value;
    }
    }
    }

    return $results;

    }

    ————–

    • This reply was modified 7 years, 2 months ago by ckworldckworld.
    in reply to: Shortcode in customfield soes not show up in results #21946
    ckworldckworld
    Participant

    FIXED it, shortcodes are now working (with your php code ) in the custom fields !!!!!

    in reply to: Shortcode in customfield soes not show up in results #21942
    ckworldckworld
    Participant

    Is there a file in the Ajax Search Pro plugin itself to place the code, so it might work??

    in reply to: Shortcode in customfield soes not show up in results #21937
    ckworldckworld
    Participant

    I do not understand why this is not working, because all the other shortcodes in the pages render fine.

    in reply to: Shortcode in customfield soes not show up in results #21935
    ckworldckworld
    Participant

    See printscreen, this is the custom field in the WordPress page with the name of the custom field and the shortcode (between brackets)

    in reply to: Shortcode in customfield soes not show up in results #21933
    ckworldckworld
    Participant

    I put the code in the .functions.php of my child theme. Unfortunately it did not work. The results page just shows the shortcode ( [sc=name=”pricemonth”] )in plain txt, see printscreen

    in reply to: Shortcode in customfield soes not show up in results #21926
    ckworldckworld
    Participant

    I tried this in the advanced description field:

    <div class=”fusion-button-wrapper fusion-alignright”><span class=”fusion-button-text”>Details & Reserve</span></div>
    <?php
    $cf_value = get_post_meta(get_the_ID(), ‘pricemonth’, TRUE);
    echo do_shortcode( $cf_value );
    ?>

    Price / month {pricemonth}<br><br>
    {teamlist}<br>

    Did not work

    in reply to: Seacrh finds to many #21922
    ckworldckworld
    Participant

    Found the solution myself! no help needed on previous question

    in reply to: Seacrh finds to many #21921
    ckworldckworld
    Participant

    Thank you,, but I have still have to scrolt with a higher result limit. I want to show them all without the scrollbar and without the more results buttton

    in reply to: Seacrh finds to many #21916
    ckworldckworld
    Participant

    Yeah, That;’s what I Thought!

    Last question, I do not want the “More results” but I would like to show all results, where (how_can I change the 10 results into another higher number??

    I do have quite a few questions, but that;s because your program is excellent with so many possibilities and choises

    in reply to: Seacrh finds to many #21911
    ckworldckworld
    Participant

    Here is the first printscreen (CSS)

Viewing 15 posts - 1 through 15 (of 25 total)