Community Forums › Forums › Archived Forums › General Discussion › Featured Widget Amplified help
Tagged: featured widget amplified, genesis, plugin, widget
- This topic has 37 replies, 2 voices, and was last updated 13 years, 3 months ago by
nickthegeek.
-
AuthorPosts
-
December 3, 2012 at 8:03 pm #3178
nickthegeek
MemberIt 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.
December 3, 2012 at 8:08 pm #3180Jeffrey
MemberJust tried that, but to no avail. 🙁 so frustrating. any other advice? thanks so much for your help!
December 3, 2012 at 8:13 pm #3182Jeffrey
MemberBTW, 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.
December 3, 2012 at 8:37 pm #3186nickthegeek
MemberJeffrey,
It would help if you could get the code to post. Try putting it in a pastie and posting a link to that
December 4, 2012 at 10:22 am #3268Jeffrey
Memberdo 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
December 4, 2012 at 4:08 pm #3342nickthegeek
MemberThat isn't the code that you referenced earlier. Which line in that is throwing the error?
December 4, 2012 at 4:33 pm #3350Jeffrey
MemberOooo, 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
December 4, 2012 at 4:37 pm #3351nickthegeek
Memberfor some reason you have this code in-between $post->ID
rel="nofollow"December 4, 2012 at 5:04 pm #3354Jeffrey
Memberremoving 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>December 4, 2012 at 5:05 pm #3355Jeffrey
Membergod 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.
December 4, 2012 at 5:40 pm #3358Jeffrey
MemberOk, got the shortcode working only to, wait for it, not have the shortcode generate a "read more" link when I use it in the post meta section of the widget. Any ideas or help Nick -- or anyone else?
December 5, 2012 at 11:44 am #3451nickthegeek
MemberWhat does your code look like now?
December 5, 2012 at 3:13 pm #3478Jeffrey
MemberHere's my full functions.php code. The shortcode section is at the very bottom - http://pastie.org/5485701. Nick, thanks SO much for your continued help.
December 5, 2012 at 7:02 pm #3500Jeffrey
MemberI notice the shortcodes you use in the widget configuration are formatted like this: [short_code]. I believe my short code is written to be like this [short code]. Does that make a difference?
December 6, 2012 at 4:09 am #3552Jeffrey
MemberFYI, i'm putting the shortcodes in the post meta field of the widget like this: [post_comments] [read-more] (but i've also tried [read more] and [read_more]. None work.
December 8, 2012 at 2:57 pm #3881Jeffrey
MemberAny thoughts on this nick?
December 19, 2012 at 5:01 pm #6276Jeffrey
MemberStill trying to fix this nick. Do you (or anyone else) have any input?
December 20, 2012 at 4:06 pm #6513nickthegeek
MemberSorry, does the shortcode work when not in the plugin field?
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.