Mr. FFP
Forum Replies Created
-
Forum: Plugins
In reply to: [Table of Contents Plus] Toc not appearing –Found what I believe to be a fix — namely, selecting the “show automatically” box in the plugin settings, saving the changes, and then deselecting it and saving the changes. The [toc] shortcode controlling manual placement is now working for me again.
Forum: Plugins
In reply to: [Table of Contents Plus] Toc not appearing –As of this morning, this just started happening for me as well. Oddly, previous posts still display the TOC where I have placed the [toc] shortcode, but the new post I am drafting does not.
My experience jives with @gicolek inasmuch that if I force the TOC to display automatically via the plugin settings, it does.
I rolled back all updates to active plugins that I’ve installed since my last post where the shortcode was behaving properly, but this has not had any effect on the issue. I’ve not installed any new plugins or theme updates in the period since.
I also tried deactivating and reactivating the TOC+ plugin, to no avail. I’m using WordPress version 4.9.8. Hoping a solution is identified.
- This reply was modified 7 years, 4 months ago by Mr. FFP. Reason: Included reference to additional test of having deactivated and reactivated the TOC+ plugin during testing
Forum: Plugins
In reply to: [ImageInject] Does Image Inject work at all anymoreVersion 1.16 broke the use of the Flickr module for me, while Pixabay results never worked correctly for me in version 1.15.
However, I did find that both Flickr and Pixabay results will work correctly in version 1.16 if you apply the quick code update to wpinject.php that I’ve listed in the below support thread:
https://ww.wp.xz.cn/support/topic/easy-fix-found-for-the-broken-flickr-module-in-version-1-16/
Good luck!
Forum: Themes and Templates
In reply to: [Nisarg] Featured image not showingHello lilleulven,
I’m afraid I cannot help as I don’t use Jetpack myself. I also don’t use featured images, primarily because I’ve been unable to reconcile the inability to provide photo attribution for the featured images when viewed on the Home page.
I use a work-around of manually inserting my own image at the top of each post, which displays in place of the featured image on the home page just fine while also displaying photo attributes such as the caption with photo credits.
Sounds like you’ve identified a potential source for your issue, though. I hope you get it resolved!
Forum: Plugins
In reply to: [Advanced Excerpt] Images Missing from ExcerptI experienced the same issue. Update 4.9.5 removed images from the top of a post. I too had to roll back to resolve the issue.
It appears 4.9.5 was intended to fix a broken functionality in plugin settings which enables the stripping of image caption text from the excerpt, but went a bit too far.
You could try deselecting the related parameter in the plugin settings to see whether this is an effective work-around, but it probably offers no advantages over simply not updating to 4.9.5.
Forum: Themes and Templates
In reply to: [Nisarg] reCAPTCHA Code Causing White Box Under FooterTurns out, the reCAPTCHA incident was simply coincidence. The true problem was caused by a recent update to my commenting solution plugin, WPDiscuz.
They will be fixing this in a future release, but have provided code to be added to functions.php for now:
if (!function_exists(‘hide_empty_div’) && function_exists(‘wpdiscuz’)) { add_action(‘wp_footer’, ‘hide_empty_div’); function hide_empty_div() { global $post; $wpd = wpdiscuz(); if ($wpd && !$wpd->helper->isLoadWpdiscuz($post)) { $css = “#wpdInfo{display:none;}”; echo $css; } } }- This reply was modified 8 years ago by Mr. FFP. Reason: Added link to WPDiscuz solution
Forum: Themes and Templates
In reply to: [Nisarg] reCAPTCHA Code Causing White Box Under FooterAs another piece to the puzzle, it appears the empty white box beneath the footer appears on pages, but not posts.
Forum: Themes and Templates
In reply to: [Nisarg] How do I limit post excerpt length on homepage only?I believe an excerpt length of 80 characters is the WordPress default, irrespective of theme used.
You could attempt to change your WordPress settings via WP Dashboard -> Settings -> Reading to display “Full Post” rather than “Excerpt” and then experiment with inserting a custom “Read More” tag in the body of each post where you wanted the excerpt or teaser to end. You can do this via the standard WP Post Editor using the “Read More” button in the text formatting options list.
The option I used for slightly more control was to download the Advanced Excerpt WordPress plugin . I preferred this solution as it provides options to change the automatically assigned excerpt length to a given character limit without needing to set custom “Read More” tags for each post, while also allowing you to customize the length of the excerpt or teaser for a given post if needed by inserting a “Read More” tag. Best of both worlds.
The plugin also enables you to refine your automatically-defined excerpts by ending them not at a given character limit, which can awkwardly interrupt both words and sentences, but also by ending them at the end of a word or sentence after so many characters are exceeded.
Be aware that if you toggle your WP Dashboard Settings from “Excerpt” to “Full Post” and use “Read More” tags to limit excerpt length, your RSS feed will show full posts in their entirety, as the RSS feed does not recognize “Read More” tags. This also has an implication for any email newsletter service providers or campaigns which you have automatically serving new blog content to subscribers via your RSS feed – subscribers will receive full posts via email, not posts with excerpts. This can limit traffic to your website and also leave you vulnerable to content “scraping”.
I think your easiest option is to use the Advanced Excerpt plugin and change the excerpt length from the default 80 characters to something shorter that suits your purpose, like 30 characters. You can then define whether you want this to be a hard stop or whether you want to let the last word or sentence finish after the defined character limit is exceeded.
If you opt to toggle your WP -> Settings -> Reading settings from “Excerpt” to “Full Post” to enable the more refined control of your excerpts / teasers via the use of custom “Read More” tags, the workaround for forcing your RSS feed to honor the “Read More” tag is outlined here and requires adding the below code to the functions.php file within your child Nisarg theme:
/* This function displays a custom teaser, by finding the teaser content using preg_split. It then appends a custom more link and returns the filtered content which then will show up in your RSS feed. http://www.peterrknight.com/how-to-truncate-your-wordpress-rss-feed-at-the-more-tag/ */ function custom_rss_teaser( $content ){ $teaser = preg_split( '/<span id\=\"(more\-\d+)"><\/span>/', $content ); $readmore = '<p><a href="'.get_permalink().'">Continue Reading</a></p>'; $content = $teaser[0].$readmore; return $content; } add_filter( 'the_content_feed' ,'custom_rss_teaser' );Good luck!
Forum: Themes and Templates
In reply to: [Nisarg] header image not resizing on phonesHi Goldfishlake,
Would you mind sharing what you did to resolve your issue? I’m having issues with my website header not being responsive when viewed on mobile devices as well.
Lille,
After review I actually like your solution better, as your code tweaks are more intuitive since they leave no statements which contain both “next” and “previous” references as did mine. This would have the potential to confuse upon a further visit to the code.
That said, for novice bloggers (and coders!) such as myself, figuring out which statements to move to change the direction of the arrows and add the required spaces between the arrows and the “Previous” and “Next” links was a bit difficult.
I’ve therefore pasted full nisarg_post_navigation function code snippets below to both work-arounds for sake of future reference:
Novice Method:
function nisarg_post_navigation() { // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> <nav class="navigation" role="navigation"> <h2 class="screen-reader-text"><?php esc_html_e( 'Post navigation', 'nisarg' ); ?></h2> <div class="nav-links"> <div class="row"> <!-- Get Next Post --> <?php $next_post = get_previous_post(); if ( is_a( $next_post , 'WP_Post' ) ) { ?> <div class="col-md-6 next-post"> <a class="" href="<?php echo esc_url(get_permalink( $next_post->ID )); ?>"><span class="next-prev-text"><i class="fa fa-angle-left"></i> <?php _e(' PREVIOUS','nisarg'); ?></span><br><?php if(get_the_title( $next_post->ID ) != ''){echo get_the_title( $next_post->ID );} else { _e('Previous Post','nisarg'); }?></a> </div> <?php } else { echo '<div class="col-md-6">'; echo '<p> </p>'; echo '</div>'; } ?> <!-- Get Previous Post --> <?php $prev_post = get_next_post(); if (!empty( $prev_post )){ ?> <div class="col-md-6 prev-post"> <a class="" href="<?php echo esc_url(get_permalink( $prev_post->ID )); ?>"><span class="next-prev-text"><?php _e('NEXT ','nisarg'); ?><i class="fa fa-angle-right"></i> </span><br><?php if(get_the_title( $prev_post->ID ) != ''){echo get_the_title( $prev_post->ID );} else { _e('Next Post','nisarg'); }?></a> </div> <?php } else { echo '<div class="col-md-6">'; echo '<p> </p>'; echo '</div>'; } ?> </div> </div><!-- .nav-links --> </nav><!-- .navigation--> <?php }More Elegant Method:
function nisarg_post_navigation() { // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> <nav class="navigation" role="navigation"> <h2 class="screen-reader-text"><?php esc_html_e( 'Post navigation', 'nisarg' ); ?></h2> <div class="nav-links"> <div class="row"> <!-- Get Previous Post --> <?php $prev_post = get_previous_post(); if (!empty( $prev_post )){ ?> <div class="col-md-6 prev-post"> <a class="" href="<?php echo esc_url(get_permalink( $prev_post->ID )); ?>"><span class="next-prev-text" ><i class="fa fa-angle-left"></i><?php _e(' PREVIOUS','nisarg'); ?></span><br><?php if(get_the_title( $prev_post->ID ) != ''){echo get_the_title( $prev_post->ID );} else { _e('Previous Post','nisarg'); }?></a> </div> <?php } else { echo '<div class="col-md-6">'; echo '<p> </p>'; echo '</div>'; } ?> <!-- Get Next Post --> <?php $next_post = get_next_post(); if ( is_a( $next_post , 'WP_Post' ) ) { ?> <div class="col-md-6 next-post"> <a class="" href="<?php echo esc_url(get_permalink( $next_post->ID )); ?>"><span class="next-prev-text"><?php _e('NEXT ','nisarg'); ?><i class="fa fa-angle-right"></i></span><br><?php if(get_the_title( $next_post->ID ) != ''){echo get_the_title( $next_post->ID );} else { _e('Next Post','nisarg'); }?></a> </div> <?php } else { echo '<div class="col-md-6">'; echo '<p> </p>'; echo '</div>'; } ?> </div> </div><!-- .nav-links --> </nav><!-- .navigation--> <?php }Oi – You beat me to the punch with your post, Lille!
Here I was thinking I had discovered a grand solution. After typing it all out for sake of others to reference and submitting, I saw your post from a few minutes prior detailing a similar fix!
Thank you for taking the time to engage with this issue. Between your pointers and mine we should have this issue permanently covered for the sake of any other poor souls struggling with this same issue 🙂
- This reply was modified 8 years, 2 months ago by Mr. FFP. Reason: Typo
As it so happens, I was able to successfully resolve this issue! I had literally spent the better part of 2-3 days combing through the code in Nisarg/inc/template-tags.php and trying different combinations of swapped “Next” and “Previous” code to obtain the desired results.
I was pulling my hair out due to the fact that NONE of my changes were making ANY impact whatsoever on the format of my website. I had purged my website cache in cPanel, disabled my caching plugin, and was clearing IE 11 browser history by using CTRL+R, but was still seeing no results.
I’m a fairly logical person and this defied all logic. As a last resort, I attempted some code revisions to the template-tags.php file within the parent Nisarg theme itself rather than my child theme, and voila! Code changes started resulting in dynamic changes on my website which enabled me to link code to given behavior and thus ferret out the required changes.
For sake of posterity and hopefully preventing others from pulling their hair out as I have mine, I’ve outlined the required code changes below:
1) Navigate to Niarg/inc/template-tags.php and download a local backup copy for safety
2) Open Nisarg/inc/template-tags.php
3) Locate the “nisarg_post_navigation” function on line 55
4) Locate the get_next_post(); statement on line 77 and replace “next” with “previous”
5) Locate the (‘ NEXT ‘,’nisarg’) statement on line 82 and replace “NEXT” with “PREVIOUS”
6) Locate the (‘Next Post’,’nisarg’); statement on line 82 and replace “Next” with “Previous”
7) Locate the get_previous_post(); statement on line 94 and replace “previous” with “next”
8) Locate the (‘ PREVIOUS ‘,’nisarg’) statement on line 98 and replace “PREVIOUS” with “NEXT”
9) Locate the (‘Previous Post’,’nisarg’); statement on line 99 and replace “Previous” with “Next”
That’s it! Save your changes and you should now be seeing the “Next Post” label and article beneath your post on the right hand side, and “Previous Post” label and article on the left.
Optionally, you can copy and paste the below code snippet, which contains the above changes:
function nisarg_post_navigation() { // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> <nav class="navigation" role="navigation"> <h2 class="screen-reader-text"><?php esc_html_e( 'Post navigation', 'nisarg' ); ?></h2> <div class="nav-links"> <div class="row"> <!-- Get Next Post --> <?php $next_post = get_previous_post(); if ( is_a( $next_post , 'WP_Post' ) ) { ?> <div class="col-md-6 next-post"> <a class="" href="<?php echo esc_url(get_permalink( $next_post->ID )); ?>"><span class="next-prev-text"><i class="fa fa-angle-left"></i> <?php _e(' PREVIOUS','nisarg'); ?></span><br><?php if(get_the_title( $next_post->ID ) != ''){echo get_the_title( $next_post->ID );} else { _e('Previous Post','nisarg'); }?></a> </div> <?php } else { echo '<div class="col-md-6">'; echo '<p> </p>'; echo '</div>'; } ?> <!-- Get Previous Post --> <?php $prev_post = get_next_post(); if (!empty( $prev_post )){ ?> <div class="col-md-6 prev-post"> <a class="" href="<?php echo esc_url(get_permalink( $prev_post->ID )); ?>"><span class="next-prev-text"><?php _e('NEXT ','nisarg'); ?><i class="fa fa-angle-right"></i> </span><br><?php if(get_the_title( $prev_post->ID ) != ''){echo get_the_title( $prev_post->ID );} else { _e('Next Post','nisarg'); }?></a> </div> <?php } else { echo '<div class="col-md-6">'; echo '<p> </p>'; echo '</div>'; } ?> </div> </div><!-- .nav-links --> </nav><!-- .navigation--> <?php }If you’re not seeing the changes as expected, be certain to purge your website cache in cPanel, disable or purge your WordPress plugin cache (if you have a caching plugin installed), and clear your browser cache for the specific page you’re attempting to view. This can be done in IE 11 and Mozilla Firefox by hitting CTRL+R.
For whatever reason, copying the inc folder containing the template-tags.php file into my child theme directory didn’t work to override the original template-tags.php file code. Nor did storing the corrected template-tags.php file directly within the top-level of my child theme directory.
The only way I was able to make this work was by editing the Nisarg parent theme template-tags.php file directly. For this reason, I recommend downloading and storing a copy of the original template-tags.php file locally. Also, be aware that should you update your Nisarg theme in future, this solution may need to be re-implemented.
If you have any questions about this code or this process, I’d be happy to help. You can reach me by email at [email protected]. Cheers!
Hi Lap,
I’m having a related issue to that of the OP with the inability to customize the “Successfully Subscribed” Form Message field in Mailchimp for WP -> Messages -> Form Messages.
It appears the default message is non-editable. This is an issue for me as I have disabled double opt-in, meaning the “Check your inbox to confirm” portion of the message is invalid and misleading.
All of the other fields in the Form Message directory are editable. Is this one specific field only editable for Premium users, or is there a parameter elsewhere that interacts with the field?