• I frequently add code to my postings. For example – if I add an external link to an entry I always want it to open in a new browser.

    Another example – when I insert photos I like to have a border around them. After uploading I add code for that.

    I probably have 4 or 5 snipets of code that I add on a regular basis.

    Is there a plugin that will allow me to save code and put that code in a dropdown selection? That way I only need to go to where I need to insert code and using the pluggin add the specific code I need.

Viewing 2 replies - 1 through 2 (of 2 total)
  • When you add external links, just choose “Open in New Window” from the Add Media options box.

    If the border you put around your images isn’t terribly complicated, you can also add that via the Add Media options before or after you insert the image.

    If you want to make the border a certain color or be really specific, I was told you could use CSS selectors and so I’ve started using those like so:

    .entry a[href^="https://www.site.com/blog/wp-content/uploads/"] img {
    margin: 5px 10px 5px 5px;
    padding: 5px;
    border: #947546 1px solid;
    }

    Such that whenever there is an image link found within my <div class=”entry”> that starts with that link address, it assigns those CSS attributes

    Thread Starter reborrell

    (@reborrell)

    Excellent – thanks for the help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Saved Code’ is closed to new replies.