Forum Replies Created
-
AuthorPosts
-
December 15, 2018 at 4:24 pm in reply to: Enable Shortcodes in Authority Pro Top Banner Section #225068
jdcohan
MemberThat did it, Brad. Thanks so much.
Jeff
December 7, 2018 at 10:19 am in reply to: Enable Shortcodes in Authority Pro Top Banner Section #224884jdcohan
MemberUpdate #2:
I now see that the customizer calls the WordPress
wp_kses_post
function, which sanitizes the content. Hence the URL-encoding of the space, right?So, while this is now technically a WordPress issue and not a Genesis Authority Pro issue, I sure would appreciate advice on how to circumvent the "problem".
(I have skimmed through wp-includes/kses.php, but the solution has not jumped out at me.)
Thanks.
JeffDecember 7, 2018 at 9:53 am in reply to: Enable Shortcodes in Authority Pro Top Banner Section #224883jdcohan
MemberUpdate:
The space character in my shortcode is being converted to the %20 entity.
The site is here (still under development):
The shortcode in question is a basic permalink-embed, which works everywhere else on the site:
function nwb_permalink_embed($atts) { extract(shortcode_atts(array( 'id' => 1, 'text' => "" // default value if none supplied ), $atts)); if ($text) { $url = get_permalink($id); return "<a href='$url' title='$text'>$text</a>"; } else { return get_permalink($id); } } add_shortcode('linkto', 'nwb_permalink_embed');
And here is the contents of the Top Banner:
<a href="[linkto id='239']">Check out Dr. Nick Scalzo's article</a>, <em>Memory Loss? Corporate Knowledge and Radical Change</em>
But the rendered hyperlink shows the shortcode code, not the converted hyperlink. It was only after copying the link location and pasting it into my editor that I noticed the culprit:
http://ontracktraining.info/[linkto%20id='239']
Namely, the space character after linkto is being converted to the %20 entity.
Does anyone have any thoughts on how to address this? Thanks.
Jeff
jdcohan
MemberSolved! The plugin Genesis Style Trump was the culprit.
I should have known: the description clearly states: "Loads Genesis child theme style sheet after plugin styles."
jdcohan
MemberThanks, Victor. I'll drill down those paths.
FWIW, the automatic "intro" paragraph feature doesn't work either. Manually adding the class does work.
(I have a hunch that the problems could be related to the fact that I'm spoofing the URL for this in-development site with an entry in my computer's HOSTS file.)
I do understand it's not a theme bug. I just activated Authority Pro on a different site, and the color customizer and auto-intro paragraph feature work as expected.
jdcohan
MemberThank you, Victor.
October 12, 2016 at 6:12 am in reply to: Altitude Pro, remove Header Menu from all but Front Page #194579jdcohan
MemberThank you, @carasmo.
What I want to do is remove the nav element from all pages EXCEPT the home page.
Your code confirmed that what I had tried was ALMOST correct. (Almost, because I didn't include parens in is_front_page.)
Here's what I had - very similar to yours -which now works:
add_action( 'genesis_header', 'nwb_remove_home_menu', 12); function nwb_remove_home_menu() { if ( is_front_page() ) { return; } remove_action('genesis_after_header', 'genesis_do_nav'); }
jdcohan
MemberNew, related challenge:
All blog posts (and blog archive pages) on this site need to be protected. If a certain session variable is set and true, a visitor will see the content. Otherwise the visitor would see a "Not-authorized" message.
I've got the session variable stuff taken care of, and I've got this working for single blog posts and static pages.
My question: How would you folks do this for archives?
TIA,
Jeffjdcohan
MemberBrad -
a) Which tags and hooks to use was my quandary.
b) Simple conditional php code testing the presence and values of auth-related session variables.Update: I have things working now via a simple custom page template for protected pages whereby the conditional php code shows the protected content to signed-in members and an error message to any others.
-
AuthorPosts