Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6956101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:49:28+00:00 2026-05-27T14:49:28+00:00

The following function is part of code written into the core of a plugin

  • 0

The following function is part of code written into the core of a plugin I am reverse engineering. The problem with it is that I need to do an str_replace on it and I cannot because it is already set to echo.

The function is.

function similar_posts($args = '') {
    echo SimilarPosts::execute($args);
}

I call it in my pages using similar_posts(), but what I really need to do in my theme is call $related = similar_posts(), however that function is set to echo. How do I change that.

I tried this.

 function get_similar_posts($args = '') {
        SimilarPosts::execute($args);
    }

But that did not produce any results.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:49:29+00:00Added an answer on May 27, 2026 at 2:49 pm

    Use return instead of echo.

    So that you have:

     return SimilarPosts::execute($args);
    

    instead of:

     echo SimilarPosts::execute($args);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I often see the following code: (function () { // init part })(); but
I wrote the following function as a part of a jQuery plugin I am
I've written a login function in my code that will check if there are
I am using jQuery validation plugin (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) Following code is a part of form
I have the following function that is pulling data from a database. The ajax
In the following function, if I take out the '.prototype' part the function ceases
I am trying to move the following function listView_SelectionChanged away from code-behind and handle
I've been working on some C++ code that a friend has written and I
I have the following function implementation that checks for NULL pointer. This is a
I have a following code which works fine MsgBox(AddSomething(Of String)(Hello, World)) Public Function AddSomething(Of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.