how to customize wordpress internal functions, like adjacent_post_link()

后端 未结 2 1628
臣服心动
臣服心动 2021-01-26 05:45

I need to customize the previous_post_link() and next_post_link() on WordPress.

Per example, I want to shrink permalinks like \"Top 5 programmi

2条回答
  •  梦谈多话
    2021-01-26 06:08

    the next_post_link() and previous_post_link() function both come with customization options. http://codex.wordpress.org/Function_Reference/next_post_link. After reading that and learning what the acceptable arguments to the function are, Test to see if it is possible to pass a php function to the option, like substr().

    
    

    '%link' and '%title' are shortcodes to the post link and title.

    Let us know if it works out.

提交回复
热议问题