0

I would like to add a button next to the edit button on each article, with a link to a specific page.

This button is for translation purpose. It should redirect the user to the translation page of the post.

Thanks in advance for your help.

3
  • where do you want to add that ? in administration, on the page with the list of posts ?
    – mmm
    Commented Mar 18, 2018 at 22:09
  • I just learnt that the edit link I have come from my theme (Customizr), I thought itwas a Wordpress function. This link is on all post and pages, just above the title. I would like to add my link next to this one. Commented Mar 18, 2018 at 22:13
  • how are you intending to get the link to the translation page for the post? is that set in a custom field? the location of the edit_post_link() function, and/or the post title, depends on your theme. as it is, your question is too general to allow a precise answer.
    – Michael
    Commented Mar 18, 2018 at 22:31

1 Answer 1

0

in the free theme Customizr, you can add content after the edit link with this code in the file functions.php of the child theme

add_action("__after_regular_heading_title", function () {

    $post = $GLOBALS["post"];

    ?>

        <span>
            an addition after the link to edit
            "<?php echo htmlspecialchars($post->post_title);?>"
        </span>

    <?php

});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.