• Resolved jonzlin95

    (@jonzlin95)


    Hey Paul,

    First I want to say that I love your work, on buddypress and this etc.

    So I created a custom version of the leaderboards sidebar widget for my site, which was working fine for Achievements v3.4.1, however upon upgrading wordpress to 3.8.1, the template inheritance from dpa_get_template_part() stopped working, and it defaults to the original plugin. I tried just changing the plugin from the wordpress plugins folder and it still seems to be working. Any ideas?

    Cheers,
    -Jonathan

    https://www.ads-software.com/plugins/achievements/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Paul Wong-Gibbs

    (@djpaul)

    If there is, you’re the first person to say anything.

    * What version of WordPress did you upgrade from?
    * Did you make ANY other changes when you upgraded WordPress?
    * What template files did you override in your theme — can you give me the exact path in your theme, please?

    Thread Starter jonzlin95

    (@jonzlin95)

    Thanks for the reply Paul,

    I upgraded from WP3.6, Achievements 3.4.1 to WP 3.8.1, Achievements 3.5.1

    Upon upgrading wordpress, I also upgraded buddypress to the latest version 1.9.1

    The template file that I overrode was:
    achievements/templates/achievements/achievements/content-leaderboard-widget.php

    following a fix I found here: https://www.ads-software.com/support/topic/user-achievements-index-not-displaying

    I also overwrote the widget file itself at:
    achievements/includes/class-dpa-leaderboard-widget.php

    my theme is placed in /wp-content/themes/THEME_NAME/achievements

    My wordpress skills are pretty rudimentary, but I attempted to rewrite my changes for Achievements 3.5.1, WP3.8.1, but failed to get any sort of inheritance working with the theme, however, all the changes that I make to the plugin itself seem to be working fine (as in if I edit it from the plugin directory directly). As of now, I’m using that hack to get it showing, but this is far from a good solution ;).

    Cheers,
    -Jonathan

    Plugin Author Paul Wong-Gibbs

    (@djpaul)

    I also overwrote the widget file itself at:
    achievements/includes/class-dpa-leaderboard-widget.php

    ^ This won’t work, as you might have found out; only the template + CSS + JS files are able to be overriden.

    EDIT: assuming you meant you put it in to your theme folder into an /achievements/ subdir. If however you’ve added a copy of the new widget programatically, ignore me ??

    EDIT 2: let me reply better in a new post.

    Plugin Author Paul Wong-Gibbs

    (@djpaul)

    The template hierarchy works for me for the content-leaderboard-widget.php file just fine. Like you say, I put it in /wp-content/themes/THEME_NAME/achievements/content-leaderboard-widget.php.

    Overriding files other than the CSS, JS, or templates from inside the templates folder will not work. Unless you’ve done some custom code to integrate your copy of the widget file, it won’t be doing anything. I wonder if this has something to do with you not seeing the results you’re expecting?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Template inheritance broken with WP 3.8.1?’ is closed to new replies.