Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #165923

    Hi guys-

    So glad you added AJAX, and ‘m having a blast with it. But when you find a portfolio item in search etc. and link to it?.. it’s broken. Like…

    http://mcalpin.net/portfolio/curtis-orthodontics/
    http://mcalpin.net/portfolio/messaging-promotion/

    How can I make these view normally… or at least send all links to portfolio items to the “Portfolio” page, where you see them all and choose from the AJAX grid, etc.?

    Thanks!

    #166707

    Hello mgma!

    The only thing I can think of would be to find a plugin that can remove items from search results or to set up forwarding with a plugin so that if someone stumbles on to the single portfolio page it forwards them to the page you want instead.

    Cheers!
    Devin

    #167207

    That’s what I was thinking… to forward them to the grid page. Can you recommend a plugin to do this? I have never seen one.

    Thanks!

    #167264

    Hello!

    This may work for you.

    Best regards,
    Josue

    #171695

    Thanks Josue. I don’t see this code in your PHP files though. Also, I should mention… I’m trying to not include portfolio posts, but want to keep regular blog posts in the searches. I’m also using a plugin… Taxonomy Picker… for searching.

    Can you advise?… seems like I’m just taking guesses here.

    Thank you!

    #171720

    Hi!

    Add this code at the end of your functions.php file:

    function searchfilter($query) {
    
        if ($query->is_search && !is_admin() ) {
            $query->set('post_type',array('post','page'));
        }
    
    return $query;
    }
    
    add_filter('pre_get_posts','searchfilter');

    Tested locally, does the job (excludes portfolio from search).

    Cheers!
    Josue

    #176230

    Thanks Josue. Not working though. See here…

    http://mcalpin.net/brian-mcalpin/

    search for any of the portfolios you see here…

    http://mcalpin.net/portfolio/

    they’re stiill showing up, and just deliver a thumbnail… no link even.

    Ideas?

    #176529

    Try searching when not logged in to your WordPress account.

    #177272

    Nope. Still doesn’t work. They all still come up in the AJAX search.

    Thanks Devin

    #178018

    Hey!

    Please try Relevanssi: http://wordpress.org/plugins/relevanssi/ and this code: https://kriesi.at/support/topic/enfold-code-update-for-2-2-to-use-relavanssi-plugin/#post-168752

    After the plugin installation go to the configuration page and search for the “Indexing options” – there you can select/deselect the post typesyou want to add to the search index. Deselect the “portfolio” checkbox and save the settings.

    Best regards,
    Peter

    #178863

    Thanks Dude.. will check it out.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘My portfolio items a broken when not viewed with AJAX’ is closed to new replies.