Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS add Class to php

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #276477
    miraziz
    Participant

    Hi
    I use this code to show wp post nav.
    function.php

    function mehran_next_post_title($title) {
        return 'Next Poet';
    }
    function mehran_previous_post_title($title) {
        return 'previous Poet'; 
    }
    

    single.php

    <?php
    
    add_filter('the_title', 'mehran_previous_post_title');
    previous_post_link('« %link', '%title', true);
    add_filter('the_title', 'mehran_next_post_title');
    next_post_link('%link »', '%title', true);
    remove_filter('the_title', 'mehran_previous_post_title');
    remove_filter('the_title', 'mehran_next_post_title');
    
    ?>
    

    How can i add class to «Next Poet» and «previous Poet» ?

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.