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 7491561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:04:39+00:00 2026-05-29T16:04:39+00:00

Can you please help me with following? I am building plugin that will based

  • 0

Can you please help me with following? I am building plugin that will based on different pages show different content.
For example, on page1 there will be one content, on page2 other, and on all other the content will stay as it was.
Here is my plugin code (I take content and change it for specific pages only):

$content = get_the_content();
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);

wp_enqueue_script('ajax_bill', '/wp-content/plugins/ed-merna-mesta/js/ajax_bill.js');
wp_enqueue_style('styles', '/wp-content/plugins/ed-merna-mesta/css/styles.css');
include_once("php/functions.php");
include_once("php/functions_helper.php"); 

add_filter('the_content','get_plugin_page_content', $content);     

function get_plugin_page_content($content) {
    if (is_page('page1')) {
        get_accounts_list();
    }
    else if (is_page('page2'))
    {
        last_account_bill();
    }
    else
        echo $content;    
}

Problem is that home page show something like (I have some random text):
[one_third]
A lot of fonts included
[icon_pencil]Quisque convallis orci ut lacus sed imperdiet eget lobortis dolor tellus pharetra. In hac dolor habitasse platea dictumst. Integer sedelor risus sit mi ligula. Lorem ipsum dolor sit amet platea in distumst. Quisque convallis orci ut lacus sed imperdiet eget lobortis dolor tellus pharetra. [button url=”#”]Read more…[/button] [/one_third] [one_third]

There is some problem with showing the content!
When I comment line:
add_filter(‘the_content’,’get_plugin_page_content’, $content);
everything is OK on home page (plugin not showing anything of course).

I am using clear-theme.
Where am I going wrong???

Thank you.

  • 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-29T16:04:40+00:00Added an answer on May 29, 2026 at 4:04 pm

    if anyone stumbles to same problem, I figured it out:

    I needed:

    do_shortcode( $content ); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone please help me with the following issue. You will see that in
Can anyone please help me to work out how to achieve the following? I
Can someone please help me figure out a way to achieve the following (see
Please can someone help? I have the following code which uploads a file to
can someone please help me with the following query i need to update a
Can anyone please help me in writing rspec for the following method The write_entry_to_xml
the following regexp is wrong - can someone please help to find all :-)
Can someone please help me understand the following: In the previous version of NHibernate
Can you please help me answer the following questions? How do people usually implement
Can anyone please help me to solve the following error: Error cannot find interface

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.