New answers tagged

0

You can indeed add a filter to get_next_posts_link, but it has a different name, namely next_posts_link_attributes Complete code would look like this: add_filter('next_posts_link_attributes', 'wpse_230552'); function wpse_230552() { return 'class="iamclass"'; }


0

It looks like the filter's name is next_posts_link_attributes but not get_next_posts_link as that the name of the function. So try instead: add_filter( 'next_posts_link_attributes', 'wpse_next_posts_link_attributes' ); where wpse_next_posts_link_attributes() is your filter callback. Example (untested): function wpse_next_posts_link_attributes( $...


0

You have to edit your post template and add external url. try replacing the_permalink() by your url. <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" > <?php if ( has_post_thumbnail($post->ID) ) { the_post_thumbnail('thumbnail'); echo get_post($post->...


2

Add this function in your theme's functions.php function my_enqueue($hook) { if ('post.php' != $hook ) { return; } wp_enqueue_script('my_custom_script', get_template_directory_uri() . '/js/myscript.js'); } add_action('admin_enqueue_scripts', 'my_enqueue');` In myscript.js place this code jQuery(document).ready(function(){ jQuery('#...


0

You can create a template page and use the WP loop: taxonomy-{taxonomy}-{term}.php https://developer.wordpress.org/themes/template-files-section/taxonomy-templates/ Or you can use the get_posts functionality: https://codex.wordpress.org/Template_Tags/get_posts#Taxonomy_Parameters Something like this maybe: <?php $args = array( '...



Top 50 recent answers are included