Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Tod
    Participant

    A couple years ago a contractor created a shortcode for me for a site that I own. Unfortunately that dev has died. I need help using that shortcode on another site – ideally creating something that I can add to other sites without a lot of trouble.

    The sc is designed to allow the insertion of a few introductory remarks (not an excerpt) at the top of a post. In order to do this, I type [short_intro]Some text, maybe more text, plus more text[/short_intro] as the first text string at the top of a post. This is displayed as shown on this page https://todw.us/short-intro-test/.

    I downloaded your plugin and began working my way through the setup of a shortcode. The following code is all I know that the dev provided me, and I pasted it in the code field:

    .intro {
    line-height: 30px;
    max-width: 70%;
    font-family: asul;
    color: #910000;
    padding: 5px;
    margin: auto;
    display: table;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    }

    I assigned a name and saved it. I then created a post on a different site that used the new shortcode. The result is visible here: https://thetodw.com/2020/08/21/intro-test/

    As you can see, it did not work.

    Can you please help me create this sc?

    ====
    On a side note, how much would you charge to create a plugin that installs this shortcode? Please contact me at the address I provided on the “Subscribe” form –

    Thank you
    tod.w

    Hi Tod,

    The code you are using is CSS. So you have to wrap that with <style></style> tag.

    Edit the shortcode content to below.

    
    <style>
    .intro {
    line-height: 30px;
    max-width: 70%;
    font-family: asul;
    color: #910000;
    padding: 5px;
    margin: auto;
    display: table;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    }
    </style>
    

    Then you can use [sc name="my-shortcode-name"] in the post.
    This will place the above code in the post whenever you use the shortcode.

    I’m not sure how the short_intro shortcode come into picture here as that is not related to shortcoder plugin. Please explain in detail if needed. You can also refer this doc about using “enclosed content” here – https://www.aakashweb.com/docs/shortcoder-doc/shortcode-parameters/#shortcode-enclosed-content

    Thanks,
    Aakash

    Marking this thread as resolved.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam.