Forum Replies Created
-
AuthorPosts
-
TonyMember
Thank you Marcy. I am aware of the more tag, but it would be a labor intensive task to go through 500 posts to insert that tag in each of them.
It seems the function should work, and it does for all tags except <p> tags beyond the 1st one.
Just trying to figure out why it leaves in the first paragraph tag but not the rest.
December 12, 2015 at 12:10 pm in reply to: Losing formatting when displaying limited content #173627TonyMemberI've put the code below into my functions.php file and it works for the most part, but it still strips all the paragraph tags except for the first one. Does anyone know why that's happening.
Here's the code:
add_filter( 'get_the_content_limit_allowedtags', 'get_the_content_limit_custom_allowedtags' ); /** * @author Brad Dalton * @example http://wp.me/p1lTu0-a5w */ function get_the_content_limit_custom_allowedtags() { // Add custom tags to this string return '<script>,<style>,<br>,<em>,<i>,<ul>,<ol>,<li>,<a>,<p>,<h2>'; }
TonyMemberI was able to get the result I want by placing:
[post_comments zero="0" one="1" more="%"]
in the genesis_entry_header hook using the simple hooks plugin.
It still would be nice to know how to accomplish this the right way in the functions.php file.
TonyMemberHi Andrea,
Thank you for the resource, but unless I didn't see it, it's not quite what I'm looking for.
I'm referring to the "leave a comment" link that appears in the post info section, specifically the .entry-comments-link span class.
This is where it shows how many comments the article has. I want to change it from the default "leave a comment" when there's zero comments to just display "0".
The code I posted in the original post doesn't work, and I'm not sure why.
TonyMemberI see. I saw the "is not" statement, but I couldn't figure out what they were doing. Since I don't want it on pages, I made the code like this:
//* Hook welcome message widget area before content add_action( 'genesis_before_loop', 'beautiful_welcome_message' ); function beautiful_welcome_message() { if ( is_front_page() || get_query_var( 'paged' ) >= 2 || is_single()) genesis_widget_area( 'welcome-message', array( 'before' => '<div class="welcome-message" class="widget-area">', 'after' => '</div>', ) ); }
Thanks for the help!
December 8, 2013 at 2:41 pm in reply to: Magazine Pro – How to add social media buttons to secondary menu #77727TonyMemberFigured it out by adapting this blog post - http://sridharkatakam.com/how-to-add-a-widgeted-area-in-navigation-bar-in-genesis/
TonyMemberThanks. I saw those setup instructions, but was using the Genesis Featured Widgets Amplified, which does not work. The Featured Posts Widget does work, however.
Resolved.
-
AuthorPosts