WordPress.org

Ready to get started?Download WordPress

Forums

Associated Posts Lite
Post Page Associator and Jetpack's Sharedaddy? (11 posts)

  1. thomasgam
    Member
    Posted 2 years ago #

    Dear everbody

    I love Post Page Associator and Jetpack's Sharedaddy plugins, but they disrupt eachother on my testpage - http://www.bylivkolding.dk/test/?page_id=47

    Any suggestions?

    I can tell you, that:

    Post Page Associator:
    Selection mode: All post which are at least in one of these categories
    Number of pages > 5

    Do you think that they are called at the same time? I know that Sharedaddy works on pages, where Post Page Associator is not active - http://www.bylivkolding.dk/test/?page_id=45

    And I know that Post Page Associator worked before Jetpack was installed.

    Thanks for the help!

    // Thomas Gam

  2. Dennis Hoppe
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Thomas, I already know about this problem. It is a limitation of the WordPress filter handler (apply_filter function). Especially it is not possible to call the "the_content" filter inside the content of a page. :\ For now I will share this hotfix with you until I have fixed this issue in the plugin. (I will do that as soon as possible!)

    You could create a plugin file or you could copy it in your themes function.php. :) Here is the fix: http://pastebin.com/FH5iTwvH

  3. thomasgam
    Member
    Posted 2 years ago #

    Thanks Dennis

    I'm almost there now, but I still have some problems.

    I have made my own childtheme with a simple extra function to the normal Twentyeleven functions.php:

    <?php
    //*CUSTOM HEADER SIZE
    add_filter( 'twentyeleven_header_image_height', 'bylivkolding_header_height');
    
    function bylivkolding_header_height($param) {
    
    return 150;
    }
    ?>

    Then I just added your fix in the same functions.php file, but it didn't work.
    Doesn't your fix miss a ?> at the end?

    // Thomas

  4. Dennis Hoppe
    Member
    Plugin Author

    Posted 2 years ago #

    If you want to append non-php code to the fix you need to add the ?> closing tag at the end. :)

  5. thomasgam
    Member
    Posted 2 years ago #

    Hi again

    Okay, I end up with a functions.php in my child theme, that looks like this - http://pastebin.com/GHh1bgh8

    But it doesn't work for me - http://www.bylivkolding.dk/test/?page_id=47

    // Thomas

  6. Dennis Hoppe
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Thomas!

    The functions.php looks fine. I am not sure why it does not work. Do you use any cache plugins?

    I converted it to a plugin. So you do not need to insert it in your functions.php. You can download the plugin here: http://www.datafilehost.com/download-a394f431.html

    Please remove the the plugin code from your functions.php to make the plugin work. :)

  7. thomasgam
    Member
    Posted 2 years ago #

    Hi Dennis

    Uhm...

    1) I downloaded, unzipped and placed the folder with the plugin file from you in the plugin folder.

    2) I activated the plugin and still the same problem - http://www.bylivkolding.dk/test/?page_id=47

    3) I removed your original fix from my own functions.php.
    - - - - - -

    I don't use any cache plugins. I noticed a small thing, that might help us find the explanation. I use Notepadd++ to edit and create new CSS and PHP files (still on beginner level).

    I noticed, that if the functions.php is encoded with UTF-8, I get this mistake, when I try to log in to my WordPress site - http://www.bylivkolding.dk/arkiv-hosting/utf8-functions.jpg

    But when I use ANSI, it works fine. Maybe I fucked something up there?

    // Thomas

  8. Dennis Hoppe
    Member
    Plugin Author

    Posted 2 years ago #

    the error in your functions.php could be a whitespace at the beginning at the file. I also encode all my files UTF8 and it works fine. :)

    Something else: (Maybe a stupid question): Did you tick the "enable sharing for this page" box in the edit page section of the "Munkebo" page? ;)

  9. thomasgam
    Member
    Posted 2 years ago #

    Hi again

    I'm one step closer. Now it works - http://www.bylivkolding.dk/test/?page_id=45

    BUT: Look at the final text before Share article and icons: "Del dette:FacebookUdskrivE-mailDelStumbleUponDiggReddit". It means 'share' in Danish, and I'm using the Danish translation of the Jetpack plugin package, that contains Sharedaddy. Basicly it just the Jetpack with a Danish translation file, that some Danish WordPress persons have made.

    When I change this piece of text in the Sharedaddy Settings, it also changes on the page = it is not only something to do with cache.

    It looks like, that the Sharedaddy plugin in called at twice: 1) that doesn't work and then the one with your fix.

    // Thomas

  10. Dennis Hoppe
    Member
    Plugin Author

    Posted 2 years ago #

    This happens because the Sharedaddy plugin tries to add the share buttons to the post content of "Tester ByLivKoldings nye hjemmeside".

    You avoid that if you create an excerpt for this post or if the post has more of 55 words of content. (Your test post has less than 55 words of content.)

  11. thomasgam
    Member
    Posted 2 years ago #

    Perfect! Know it works.

    All the best,

    Thomas

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic