Posts by marktaylor

    Thanks Clive, that's solved the issue of outputting the tags in the source, however, it is now outputting/rendering "1" on the page when each checkbox is selected. Any ideas why this would be?


    Thanks,

    Thanks for your replies. I have opted for the multiple item regions option.


    I'm trying to add a checkbox for dietary requirements - the code below works however the perch tags are outputted in the source code... is something wrong?



    <perch:if exists="vegetarian OR vegan OR glutenfree">


    <table class="dietary-requirements">

    <tr>

    <perch:if exists="vegetarian">

    <td class="vegetarian"><perch:input id="vegetarian" type="checkbox" label="Vegetarian"></td>

    </perch:if>


    <perch:if exists="vegan">

    <td class="vegan"><perch:input id="vegan" type="checkbox" label="Vegan"></td>

    </perch:if>


    <perch:if exists="glutenfree">

    <td class="gluten-free"><perch:input id="glutenfree" type="checkbox" label="Gluten Free"></td>

    </perch:if>

    </tr>

    </table>

    </perch:if>


    Thanks,

    Hi,


    Is there a way to add the blog post except as the meta description in the <head>. I've tried using the Open Graph tags but to no avail.


    PHP
    1. <meta name="description" content="<?php perch_blog_post_field(perch_get('s'), 'excerpt'); ?>" />

    This outputs the excerpt but includes the <p> tags around it.


    Thanks in advance.

    Hi,


    I have a generic 'Archive' page with the below title, however this is being marked down for SEO as many of the 'pages' have the same title. Is it possible to dynamically insert the category or tag returned.


    This is how it is : <title>Archive | <?php echo $companyName ;?></title>

    Ideally I'd like this if possible: <title>Archive of (Tag/Category) | <?php echo $companyName ;?></title>



    I output the returned queries using the below, if it in anyway helps.


    Thanks in advance.


    Thanks, that's perfect!!


    How do I expand the range of filtering? Is there a list of options available (ie postTitle, postDescHTML)


    I'd like to include the main content, tags and categories.


    Also is there a way to include similar matches? As when I search tree, only items with 'tree' appear, the items with 'trees' do not.


    Thanks

    Sorry, this has confused me. I've tried replacing search with blog and it's not worked.


    This is my output search results page:


    This is blog_search_results.php


    PHP
    1. <?php
    2. perch_blog_custom([
    3. 'template' => 'post_search_result',
    4. 'filter' => 'postURL',
    5. 'value' => perch_layout_var('url', true),
    6. ]);
    7. ?>


    and this search-result.html


    Any help much appreciated.

    Hi Clive, thanks for pointing me to this article. I've managed to implement this but have run into a couple of issues...


    1. I can't seem to change the order of the results - I've tried adding sort order but it doesn't seem to work.

    2. The search returns 23 results, however I've filtered to show 9, but when clicking through to pages 2 and 3, no results are shown.


    I don't suppose you can help?


    Thanks

    I've just come across another issue. When there are multiple pages of results (I currently have the count at 9), no results show on the other pages, however it is saying there are 3 pages. Here is my code.


    Hi,


    I've managed to successfully implement this, however I can't seem to change the order of the search results. I'd like the latest to show first, but it shows the oldest first. I've tried adding the 'sort-order'=>'DESC' however this doesn't seem to work.


    Any help much appreciated.


    Thanks

    Hi Clive, that works great thanks.


    I'm trying to style the search results as per my post listings but have hit a wall with some bits. I can't seem to pull in the post image, post date or control the length of the excerpt. I've managed to get the button and heading to style but can't seem to control the bits mentioned. I've posted the code below, any help/direction is much appreciated.



    Thanks

    Hi Clive,


    This is my search form template


    <perch:form id="search" method="get">

    <div>

    <!-- <perch:label for="q">Search</perch:label> -->

    <perch:input type="search" id="q" />

    <perch:input type="submit" value="Go" />

    </div>

    </perch:form>


    Any help much appreicated.


    Thanks

    Hi,


    I'm trying to implement a search bar on main news page, which is working, however the general news posts are still listed below the search results. Is there a way to open the results in a new page or have the general posts hidden so just the search results show?


    This is my code so far...


    <?php perch_search_form(); ?>


    <?php perch_content_search(perch_get('q'), [

    'template' => 'search-result.html',

    'count'=>9

    ]); ?>


    <div class="row">

    <?php perch_blog_recent_posts(9); ?>

    </div>



    Thanks

    Turns out I had removed these 2 lines from the post.html


    <perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="3" suppress="true" size="s" />

    <perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />


    What does the second line do/mean?


    Sorry to ask a dumb question, quite new to Perch.