Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 891 through 900 (of 1,224 total)
  • Author
    Search Results
  • #61849

    Trevor
    Participant

    Hi Stan

    Q. I want pictures to be displayed as documents (as a hyperlink), no as an image itself. Is this possible?
    A. It depends which Display Results method you are using. If you are using As a Shortcode, then editing the results.php template file can probably achieve your goal. If you are using one of the other Display Results methods, then what appears in the results is determined by your theme and its template files. You would have to customize your theme files.

    Q. Is it possible to have a search form on some specific page, instead of in the sidebar on the right?
    A. I assume that your theme allows only standard placement of widgets in that sidebar, yes? This depends on your theme. If you can create a page, and you have some means of placing a text area, you can instead place the form shortcode (shown in the form design on the right) and the theme may well allow it to work. Again, this is theme dependent.

    #61291

    In reply to: Search Results


    Trevor
    Participant

    It turns out this was a combination of searching pages where the results page was in the search (we are trying to prevent this somehow in a future release) and coding errors you made in the results.php file, which I have fixed for you. I am closing this for now.

    #61269

    In reply to: Search Results


    Trevor
    Participant

    For some reason, the search/results page loads OK to start. The Ajax filter works, but it duplicates the results. First time through it filters, second time it does not. Both times it uses the results.php

    A page refresh (not using Ajax) with the search parameters in place gives the right results.

    I can’t see any console js errors.

    #60954

    In reply to: Using S&F with Thesis


    Trevor
    Participant

    Hi Lisa

    I am guessing you are located somewhere in the USA and it must be about 4AM there right now?

    Using the shortcode (I think the best choice for your theme) it uses our results.php template (from the plugin’s template folder. You can make a copy of that in your theme and then customize it, see here:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results

    I am quite used to making theme-specific versions for users, if they can provide me with a ‘normal’ archives type page in their theme or site that I can use as a reference. Providing that the reference page does not use Isotope or Masonry, which makes it much harder for me to do.

    If you are a competent coder, I can show you how using Skype.

    #60732

    Anonymous
    Inactive

    Yeah, but like I said, I’d need that number outside of the template file results.php. What I did to fix this was create another template file (with the ID of the search form) and just loaded the shortcode for that form, while the template file only holds the number of posts which I can then embedd wherever I need it to. Not ideal, but it works. But like I said, it would be useful to get this number inside the form, for example, to display that number inside the form submit button, would that be possible?

    #60726

    Trevor
    Participant

    The documentation shows how to make a copy of the results.php template file here:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results

    But as each theme is different, the actual customizing is not so easy. When I do this, I do not copy and past whole blocks of code, but instead I gradually edit, add, move and delete parts as needed until it becomes to look right.

    #60671

    Anonymous
    Inactive

    I`ve been tryin make that thing with the archive page workin but I did not succeeded so I have no other choice but to use the shortcode. Now I am wondering how to impelement that .php code which is how i want my single result to look like :

    <?php
    
    global $post, $mk_options;
    
    if ($view_params['layout'] == 'full') {
    $image_width = $mk_options['grid_width'] – 40;
    } else {
    $image_width = (($mk_options['content_width'] / 100) * $mk_options['grid_width']) – 40;
    }
    
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    $post_type = !empty($post_type) ? $post_type : 'image';
    ?>
    
    <article id="<?php the_ID(); ?>" class="mk-blog-modern-item mk-isotop-item <?php echo $post_type; ?>-post-type">
    <?php
    $media_atts = array(
    'image_size' => $view_params['image_size'],
    'image_width' => $image_width,
    'image_height' => $view_params['grid_image_height'],
    'post_type' => $post_type,
    //'image_quality' => $view_params['image_quality']
    );
    echo mk_get_shortcode_view('mk_blog', 'components/featured-media', true, $media_atts);
    
    if ($view_params['comments_share'] != 'false') { ?>
    <div class="blog-modern-social-section">
    <?php
    echo mk_get_shortcode_view('mk_blog', 'components/social-share', true);
    echo mk_get_shortcode_view('mk_blog', 'components/comments', true, ['post_type' => $post_type]);
    echo mk_get_shortcode_view('mk_blog', 'components/love-this', true);
    ?>
    </div>
    <?php } ?>
    
    <div class="mk-blog-meta">
    <?php
    echo mk_get_shortcode_view('mk_blog', 'components/meta', true);
    echo mk_get_shortcode_view('mk_blog', 'components/title', true);
    echo mk_get_shortcode_view('mk_blog', 'components/excerpt', true, ['excerpt_length' => $view_params['excerpt_length'], 'full_content' => $view_params['full_content']]);
    ?>
    
    <?php
    echo do_shortcode( '[mk_button dimension="flat" corner_style="rounded" bg_color="'.$mk_options['skin_color'].'" btn_hover_bg="'.hexDarker($mk_options['skin_color'], 30).'" text_color="light" btn_hover_txt_color="#ffffff" size="medium" target="_self" align="none" url="'.get_permalink().'"]'.__('READ MORE', 'mk_framework').'[/mk_button]' );
    ?>
    <!– "><?php _e('READ MORE', 'mk_framework'); ?> –>
    
    <div class="clearboth"></div>
    </div>
    
    <div class="clearboth"></div>
    </article>

    I guess i have to put it in your results.php file… ?

    #59828

    Trevor
    Participant

    The results.php file shows this in the pagination, doesn’t it?

    #59685

    Trevor
    Participant

    Hi Martijn

    I am not quite sure what it is you are asking. I am unable to offer you coding advice about how to create theme templates, whether you are writing your own theme or whether you are modifying an existing theme. In our plugin folder you will find a templates folder and in that a results.php file that our plugin uses by default for a form that is set to use the ‘Shortcode’ display results method. Would that help?

    Otherwise, do a search of this forum for have_posts and see the advice given to others (such as this post) and what others have used.

    #59521

    Ross
    Keymaster

    Hi Maxime

    I figured out the issue – I’ll try to explain..

    This page is currently working ok, with visual composer disabled:

    http://maximegiraud.fr/fpe/recherche/

    Notice the first search result “recherche”, it is a result of the current page, and underneath (the_excerpt) there is a blank space…

    Now when you enable visual composer this page no longer works…

    When using a shortcode, the display of results is defined by the template in the S&f folder – templates/results.php..

    Commenting out the_excerpt makes this page work again, with S&F and visual composer enabled 🙂

    So… I tracked down the issue, it seems when visual composer is disabled, the_excerpt does not run shortcodes inside, when visual composer is enabled it actually executes shortcodes inside the_excerpt

    The problem is with the first result – “recherche” – because it is the S&F results page, and if it executes the result shortcode in the_excerpt, then you have an endless loop…

    One way to get around this is to exclude the page with your search results, from the search results… To do this, in S&F, go to the posts tab, and where its says “exclude post ids”, simply put in a 6, this mean S&F and visual composer in this instance will have no issues.

    Best

Viewing 10 results - 891 through 900 (of 1,224 total)