Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Lax Mariappan

    (@lakshmananphp)

    Hi clayefeld,

    1)Edit the plugin file
    wp-content/plugins/fbf-facebook-page-feed-widget/fbf_facebook_page_feed.php
    2)Go to line number 80. you will find this code.
    $feedtitle ="<h4><a href=".$block->get_permalink()." class='facebook_page-link' ".$link_target.">".substr($block->get_title(), 0, 200)."</a></h4>"; // Title of the update
    3)Replace this with the following code
    $feedtitle ="<h4><a href=".$block->get_permalink()." class='facebook_page-link' ".$link_target.">".$block->get_title()."</a></h4>"; // Title of the update
    4)Save the file.
    5)Take a backup of the old file and overwrite the modified file in your website(wp-content/plugins/fbf-facebook-page-feed-widget/).

    We have removed the character limit now.

    You should be able to show full title.

    This code is tested in my local machine.

    Try it out. Let me know if there is any issues.

    Thanks
    Lakshmanan

    Thread Starter clayefeld

    (@clayefeld)

    Thank you for your quick response! unfortunately it is not working. I’ve always 80 characters. I’ve also tried to change the value earlier of line 80 for example:

    ($block->get_title(), 0, 200)
    to
    ($block->get_title(), 5, 200)

    but with no result. I’m losing the first 5 letters of the title but not gaining anyone!

    Plugin Author Lax Mariappan

    (@lakshmananphp)

    Hi clayefeld,

    I think facebook limits the characters in the title.

    Try replacing this

    ($block->get_title(), 0, 200)

    with

    ($block->get_description(), 0, 200)

    Please Keep me updated on this.

    Thanks,
    Lakshmanan.

    Thread Starter clayefeld

    (@clayefeld)

    Thanks, it works for me!!!

    ShoGun.se

    (@shogunse)

    How do I add “…” after the last character automatically?

    //Robert

    Plugin Author Lax Mariappan

    (@lakshmananphp)

    Hi Robert,

    Add “…” to this line

    $feedtitle ="<h4><a href=".$block->get_permalink()." class='facebook_page-link' ".$link_target.">".substr($block->get_title(), 0, 200)."</a></h4>"; // Title of the update

    Example :

    $feedtitle ="<h4><a href=".$block->get_permalink()." class='facebook_page-link' ".$link_target.">".substr($block->get_title(), 0, 200)."...</a></h4>"; // Title of the update

    Add before closing the anchor tag of the title.

    Let me know if you have any issues.

    Thanks
    Lakshmanan

    ShoGun.se

    (@shogunse)

    @lakshmanan PHP

    So easy =) Thanks!

    Is it possible to only show the first row? Have changed
    get_title(), 0, 200) to get_title(), 0, 60) but it doesn’t seem to be number of characters but some kind of length.

    Sometimes it stays in one row and sometimes it gets two rows. I would like to have it only one row… https://t3sjalvskydd.se/nyheter-event-2/facebook/

    I asked about this in another thread (sorry for bumping but thought it might be good to put it here as it is related)…

    Is it possible to not repeat the feed title twice? Now it′s one as a link (and headline) and then one with plain text right under…

    Further, can I put a link to “Continue reading →” (same as feed title) and take away “The post FOUNDATION COURSE – CORE COMBATIVES appeared first on T3 SJ?LVSKYDD.”

    Plugin Author Lax Mariappan

    (@lakshmananphp)

    Hi Robert,

    Yes Facebook repeats the title in description.

    Try this quick fix to avoid repeating same title in description

    Add these two lines of code before $returnMarkup .= “<div class=\”fbf_desc\”>”.$desc.”</div>”; // Full content

    $feedtitle_raw = html_entity_decode(substr($block->get_title(), 0, 200), ENT_COMPAT, 'UTF-8');; // Raw Title of the update
    $desc = str_replace($feedtitle_raw, '', $desc); // To avoid repeating title

    Let me know if you encounter any issues.

    Thanks
    Lakshmanan

    ShoGun.se

    (@shogunse)

    @lakshmananphp

    Worked GREAT! You are awesome! I really mean it, giving fast and detailed support for a free plugin, much appreciated!

    No stress but would you care to help me solve the other “problems” as well? I try to not ask too personal questions but those that more people would like or need.

    Keep up the great work!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How can I show full title in FBF widget and not only 80 Characters’ is closed to new replies.