FontAwesome 5+

Posted in: Newspaper
Post count: 1043

Hi. Has the theme adapted to FontAwesome 5? I see FontAwesome 5.2 is already out.

Post count: 20685

Hi,

Try the plugin mentioned in this topic to use the new font awesome icons, it should work
https://forum.tagdiv.com/topic/font-awesome-error/

Post count: 1043

I use the plugin but with its own hosted icons. I will try to get the new cdn from the font awesome site.

Post count: 1043

Hi @Simion. I have this code that I used to show thumbnails in a custom next and previous posts feature using the default template. I did not find an easy way to implement it in the new single templates from the cloud library and would like to create a function in functions.php and then share a shortcode in a text element. I am aware tagdiv does not provide custom work but is there a way you can kindly assist in creating the function to call this code as a widget? Thanks in advance. Here is the code

<?php echo $td_mod_single->get_next_prev_posts(); ?>
			    <div class="navi-previous-next clear clearfix">
	            <div class="navi-previous navi-item"> <?php 	
		    	$prevPost = get_previous_post();
			$prevthumbnail = get_the_post_thumbnail($prevPost->ID,  'td_100x70'); ?>
		       	<p class="navi-icon"><?php previous_post_link('%link', '<span class="navi-prev-title">← Previous Article</span>');?></p>
		       	<div class="navi-post-content">
		  		<?php previous_post_link('%link', $prevthumbnail); ?>
		  		<?php previous_post_link('%link', '%title'); ?>
		  	</div>
	            </div>
	            <div class="navi-next navi-item"> <?php
	                $nextPost = get_next_post();
	                $nextthumbnail = get_the_post_thumbnail($nextPost->ID, 'td_100x70'); ?>
	                <p class="navi-next-icon"><?php next_post_link('%link', '<span class="navi-next-title">Next Article →</span>'); ?></p>
	                <div class="navi-post-content">
	                	<?php next_post_link('%link', $nextthumbnail); ?>
	                	<?php next_post_link('%link', '%title'); ?>
	                </div>
	            </div>
	        </div>

and preferably have something like this after the function
add_shortcode('prevsocial', 'prev_social');

Post count: 20685

I never tried something like that, probably it could be done. Check some guides for adding shortcodes
https://www.wpbeginner.com/wp-tutorials/how-to-add-a-shortcode-in-wordpress/
https://codex.wordpress.org/Function_Reference/add_shortcode
https://generatewp.com/shortcodes/
https://wpcouple.com/create-custom-wordpress-shortcodes/

I will create a request for the cloud library next/prev to have a thumbnail toggle if possible, by default.

Post count: 1043

Thanks for this. Having the team implement the function by default is good. I meant to say shortcode not widget. I tried several solutions online but each code threw a syntax error in functions.php. I once saw a similar thing implemented a few years back in a certain forgotten website but I just cannot remember how the person did it (though it was for related posts, not next previous navigation). I will keep the current format and see what it becomes of in future updates.

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.