Forums

Need help with unwanted code showing up in post descriptions (8 posts)

  1. likegluelikecrew
    Member
    Posted 2 years ago #

    Hi, I'm working on this site, nezane.org, if you go there you'll notice on the homepage in the Slideshow Gallery at the top this code from the Popularity Contest plugin gets spilled over at the end of the descriptions...

    AKPC_IDS += "168,";Popularity: unranked

    Same thing happens with in the Contact section on the homepage and on the entries for the pages as well. I like how the theme uses this plug in because it gives me a good idea of what posts people like so I don't want to deactivate it, but how can I stop that code from showing up? Here's the code from the php file, if anyone knows how I can tweak it to achieve my aim I'd be psyched, thanks!

    [Huge chunk of code moderated as per the Forum Rules. Please use a pastebin]

  2. songdogtech
    Member
    Posted 2 years ago #

    Look at the page source code; the junk code is in your header.php and it's mistake from editing your theme, and it looks like this:

    <script type="text/javascript">var AKPC_IDS = "";</script>

  3. likegluelikecrew
    Member
    Posted 2 years ago #

    My theme uses the popularity contest plug in, if I erase that code will it not work?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    That line isn't going to actually do anything in its current form. Try commenting it out using:

    <!--
    <script type="text/javascript">var AKPC_IDS = "";</script>
     -->

    if you don't want to remove it completely.

  5. likegluelikecrew
    Member
    Posted 2 years ago #

    I couldn't find that line in the header.php file, here's the full page code...

    [Code moderated as per the Forum Rules. Please use a pastebin]

  6. likegluelikecrew
    Member
    Posted 2 years ago #

    Ok, I saw there's a php file for the Popularity Contest plug in, which is probably where the problem lies. Are there any code wizards out there that can debug the problem? I posted the code for the Popularity Contest php file here:

    http://pastebin.com/iN6YUA2R

  7. likegluelikecrew
    Member
    Posted 2 years ago #

    I just got this email from the plug in developer (not the theme developer), it's rather vague and I have no idea how I would begin to implement this, but it might help someone locate the problem...

    "I think this happens when an excerpt is auto generated from the
    content, and the JS is added to the content. Something to look into
    for a possible fix, the workaround would be to create an excerpt
    manually."

  8. BigManJediKnight
    Member
    Posted 1 year ago #

    I am having the same issue with my site antiagingtreatmentsguide.com. I need to know how can i get the unwanted scripts off the home page?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.