Featured Widget Amplified help

Community Forums Forums General Discussion Featured Widget Amplified help

This topic is: not resolved

This topic contains 37 replies, has 2 voices, and was last updated by  nickthegeek 1 year, 3 months ago.

Viewing 15 posts - 16 through 30 (of 38 total)
  • Author
    Posts
  • #2667

    Jeffrey
    Participant

    shit, the forum is effing with the code i’m posting, but the top code quote in that last one was the exact code you posted, so disregard the way it is converting the characters.

    #2699

    nickthegeek
    Keymaster
    Post count: 751

    I don’t see a problem with that code, it could be the way it was added to the functions.php file.

    #3151

    Jeffrey
    Participant

    thanks for replying Nick, sorry for my delay. how could it be a problem with how it’s added to functions.php? how should it be added?

    #3165

    nickthegeek
    Keymaster
    Post count: 751

    Generally at the very end so it isn’t interfering with any other code.

    #3177

    Jeffrey
    Participant

    thanks nick. Just tried putting it at the bottom and got this error:

    Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/content/J/S/D/JSDavis82/html/wood/wp-content/themes/magazine/functions.php on line 144

    #3178

    nickthegeek
    Keymaster
    Post count: 751

    It is possible that you have some character entities. They may look like spaces or tabs to you but they don’t to PHP. Delete anything that looks like a space or a tab then manually type it back in.

    #3180

    Jeffrey
    Participant

    Just tried that, but to no avail. :-( so frustrating. any other advice? thanks so much for your help!

    #3182

    Jeffrey
    Participant

    BTW, got the exact same error after moving that code after re-typing. I even just tried to retype it in TextEdit and then copy and paste into functions.php, but didn’t work.

    #3186

    nickthegeek
    Keymaster
    Post count: 751

    Jeffrey,

    It would help if you could get the code to post. Try putting it in a pastie and posting a link to that

    http://pastie.org

    #3268

    Jeffrey
    Participant

    do you need the code from the entire functions.php file so you can see the line in reference, or just a section? if the latter, here’s the pastie. http://pastie.org/5479516

    #3342

    nickthegeek
    Keymaster
    Post count: 751

    That isn’t the code that you referenced earlier. Which line in that is throwing the error?

    #3350

    Jeffrey
    Participant

    Oooo, right you are Nick, apologies. here’s is the pastie of the full functions.php file. The error is on line 146, citing an “unexpected ‘=’”. Thanks for your help! http://pastie.org/5481130

    #3351

    nickthegeek
    Keymaster
    Post count: 751

    for some reason you have this code in-between $post->ID
    rel="nofollow"

    #3354

    Jeffrey
    Participant

    removing that where the code reads as follows results in the exact same error message (same line and referencing the = sign):

    <code>function read_more() {
    global $post;
    $return_string = ‘<a href=”‘.get_permalink($post->ID).’”>’.get_the_title().’</a>’;
    return $return_string;
    }
    add_shortcode( ‘read-more’, ‘read_more_function’);</code>

    • This reply was modified 1 year, 4 months ago by  Jeffrey.
    • This reply was modified 1 year, 4 months ago by  Jeffrey.
    #3355

    Jeffrey
    Participant

    god i can’t get this forum to paste the code right. how do u do that? *edit: Nevermind, figured it out and edited the above post with proper code formatting.

    • This reply was modified 1 year, 4 months ago by  Jeffrey.
    • This reply was modified 1 year, 4 months ago by  Jeffrey.
Viewing 15 posts - 16 through 30 (of 38 total)

You must be logged in to reply to this topic.