WP plugin

Discussion in 'PHP' started by ahdsan, Aug 1, 2013.

  1. #1
    I have a site where posts are displayed as pins on home page, when I add a plugin, it displays on the post. On click of the pin I open a popup, but the plugin does not show up in the popup. how can I make the plugins affect custom pages too.

    for example, there is the ShareThis plugin that displays on all posts , but when i open the post in popup, it won't display.
     
    ahdsan, Aug 1, 2013 IP
  2. Phaaze

    Phaaze Member

    Messages:
    51
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #2
    You'd have to find out what hook the plugins are using, and insert that hook call into your custom pages. That, or find out how to call the plugins function directly to show it.

    It wouldn't be hard, but you will have to dig though the code a bit.
     
    Phaaze, Aug 2, 2013 IP
    sarahk likes this.
  3. ahdsan

    ahdsan Member

    Messages:
    74
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3

    I checked the plugin and found this
    ==============================================
    add_filter('get_the_content', 'st_add_widget');
    add_filter('the_content', 'st_add_widget');

    // 2008-08-15 Excerpts don't play nice due to strip_tags().
    add_filter('get_the_excerpt', 'st_remove_st_add_link',9);
    add_filter('the_excerpt', 'st_add_widget');
    ==============================================

    And in the popup, the content is displayed using get_the_content()
    now what ??
     
    ahdsan, Aug 3, 2013 IP
  4. Phaaze

    Phaaze Member

    Messages:
    51
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #4
    Try replacing it with:
    apply_filters('get_the_content', get_the_content());
    Code (markup):
     
    Phaaze, Aug 3, 2013 IP