Homepage Sniplet display

3 months ago | jooj (Member) | |

John,

As I finally successfully registered to the forum, I make a post for my question. I know you answered in the comments but I think there was a misunderstood on the question.

If you go on http://www.extra777.com, you will see the post called "Tournoi Titan Poker : prix record de 2 500 000 dollars" with a sniplet called for the link "Titan Poker" just under the image. It's under WP 2.3 with sniplet 1.2.5. The sniplet displays well on what I call the homepage

Now, I updated on my development version to WP 2.5 (and also updated sniplet plugin to 1.3.2). The problem is that the same sniplet is no longer interprated on the homepage.
Nevertheless, when I click go to the single post page, the sniplet is displayed well.
You will find 2 screen capture:
- Homepage with sniplet not displaying http://www.extra777.com/extra1.jpg
- Post page with sniplet displaying http://www.extra777.com/extra2.jpg

It's not related to placement as it's a sniplet called in a post. Just to test, I add a header placement, and the behaviour is the same. Displays well on the post page but not on the homepage.
I also realized my tests on a fresh install of WP (I can send you a link for that by mail if you want)

P.S: Glad to hear from you & your great plugins. Are you still in China (your blog is not really up to date ;) ? If yes, do you plan to go to Olympic's ?

Read responses...

Responses

  1. John:

    Posted 3 months ago by Key Master

    Hi,

    It is related to placements, and also to my forgetting to put a section of code in the plugin. Basically if you want to have a sniplet appear on the home page then you need to add a placement for the appropriate section of the home page (the home page section was missing). If you want it to appear on individual posts, as well as archive pages, then you'll need placements for each.

    I'll release the new version later.

    I'm not in China anymore, no. The olympics was a long way from where I was anyway, and now it's even further!

  2. jooj:

    Posted 3 months ago by Member

    John,

    Not sure to fully understand your answer. I am not easy with placement.
    I understand that sniplet doesn't work for homepage or archive by default and that I should use placement. It's hard for me as with previous versions of sniplets, my sniplet are correctly displayed on all page of the site(home, archive, post, page, ...)

    So I tried to use archive placement as exemple. When I add this placement and load the archive page, the sniplet displays well. But the sniplet no longer displays when I click on the single post (because of the placement I imagine).

    How can I solve that ? I want that one sniplet to be interprated wherever I am on the website, because I have to display it on home,archive, single post, category page, ...
    Could I enable sniplet evaluation on all site ?

  3. John:

    Posted 2 months ago by Key Master

    If it worked in previous versions then that was a bug/side-effect - it was not designed to do that.

    In the new version you can place something on the home page by adding a placement for the home page. You can have more than one placement so it's possible to display it on the home page and on the post page etc.

    I've now added an 'all' placement to simplify if you just want it everywhere.

  4. author
    sreston:

    Posted 2 months ago by Member

    I'm having trouble with custom placement, too. I've got this in my functions.php


    add_filter ('sniplet_places', 'my_theme_places');

    function my_theme_places(){
    return array( 'sandbox' => array('sandbox/spiff' => 'Sidebar Spiff','sandbox/test' => 'just a test') );
    }

    and I see the places in my sniplets admin. I've defined a couple of sniplets as "sidebar spiff". In my template, where I want to display the sniplets, I've added:


    do_action('the_sniplet_place', 'sandbox/spiff');

    I don't see anything when the page is rendered. Any tips?

  5. author
    sreston:

    Posted 2 months ago by Member

    hmmm... sorry - meant to post my previous comment on the "custom placement" thread...

  6. John:

    Posted 2 months ago by Key Master

    That should work and is almost exactly the same as I use on this site.

  7. author
    sreston:

    Posted 1 month ago by Member

    I just updated to the new version of Sniplets and I'm still having the issue. Where I've got:

    do_action('the_sniplet_place', 'sandbox/spiff');

    I'm not seeing anything.

    do_action('the_sniplet', 'test2');

    doesn't work, either. These are global Sniplets that don't work. If I create a Sniplet with the admin on a single page and use the [sniplet NAME] notation, that works correctly.

    My custom placement is outside the loop - this is acceptable for global Sniplets, right?

  8. John:

    Posted 1 month ago by Key Master

    I've released a new version sreston, see if that helps.

  9. author
    sreston:

    Posted 1 month ago by Member

    Ah - yes. Now I'm seeing the custom-placed Sniplets. Thanks.

    One more issue: They don't observe the "limits" setting. I've defined several sniplets for that placement and I only want a random one to be displayed. I've set the limit to 1 and checked the random box. I still see all of the sniplets that are defined for that placement.

  10. John:

    Posted 1 month ago by Key Master

    Logged in the bug tracker.

  11. author
    sreston:

    Posted 1 month ago by Member

    Thanks. BTW, I upgraded to the release you made in the last day or so. Now I'm back to not seeing any sniplets at all at the custom placement. I've not changed my code - only updated the plugin.

  12. John:

    Posted 1 month ago by Key Master

    Limits fixed in latest version

  13. author
    sreston:

    Posted 1 month ago by Member

    With the new update, all of my custom placements are working.

    The limits aren't yet working for me, though.

    I've tried deactivating, deleting and re-uploading the newest version (in case it was a problem with auto-upgrade). I also manually deleted the sniplets table and removed the sniplets entries from the options table (sniplets and sniplets_version).

    No luck with getting the limits to work.

    Thanks!

  14. John:

    Posted 1 month ago by Key Master

    Did you update the limits? All limits need to be re-saved before they will take effect.

  15. author
    sreston:

    Posted 1 month ago by Member

    Yes, I did. In deleting everything sniplet-related, I ended up removing the sniplets that I had defined. So, after reinstalling everything, I recreated my sniplets and recreated the limits.

  16. John:

    Posted 1 month ago by Key Master

    Would it be possible to get an admin login onto your site, along with the URL of a page where the limits feature is not working? I think the quickest way to figure out what's happening is if I take a look myself and see if I can discover the problem.

  17. author
    sreston:

    Posted 1 month ago by Member

    I sent you an email via your comment form yesterday.

  18. author
    sreston:

    Posted 1 month ago by Member

    My issues are all remedied in v1.3.8 - Thanks!

Reply

You must log in to post.

Home | Software | Terms & Conditions | Sitemap | John Godley © 2008