Filtering comment permalinks when a condition is met

I’m not completely sure what you are trying to accomplish, but here’s what I think. Normally you would generate a link to a comment like this: echo ‘<a href=”‘ . get_permalink($comment->comment_post_ID) . ‘#comment-‘ . (strval($comment->comment_ID)) . ‘”>’; The problem with filtering get_permalink() is that the filter must know that it is called by the comments … Read more

How can I add dynamic page url in WordPress?

for this you will need to be familiar with rewrite URLs. This results can be achieved by rewrite URL. Here news will be page and postid and action will be query strings internally. Here you can find some tutorials of rewrite URLs in WordPress. For an example http://example.com/news/?edit=100 is the URL lets make prety. /** … Read more

Custom post type permalink changing itself every other change

BETTER SOLUTION Actually, there is a note on the WP_Query reference: Note: Ticket #18408 For querying posts in the admin, consider using get_posts() as wp_reset_postdata() might not behave as expected. So instead of attempting to reset the global post data, the more proper solution is either: Use get_posts(): $seriesPosts = get_posts($args); foreach($seriesPosts as $p){ $select … Read more

Remove Custom Taxonomy Base

I think this is possible, but you will need to keep an eye on the order of the rewrite rules. To help you with this I recommend a plugin I wrote to analyze the rewrite rules (soon available in the repository, but you can download a pre-release). First of all, these rules are quite generic, … Read more