Forum Replies Created
March 16, 2020 at 11:59 am in reply to: Style repeats in the page as many times as the shortcode is used #7422
Sorry Aakash, I was very unclear. That happened BEFORE I discovered you plugin!
I needed a simple <span class=”term”>xxx</span>, as I am writing a documentation site, and these spans may come 5 times in a paragraph. First, I tried to find something premade on wp.org. But when I go through that site, I have an impression that all thousands of plugins, are just clones of each other, doing essentially less than a dozen different things. And, guess what, wrapping selection into a styled span is not one of them!
I needed my so often, that I decided to bite the bullet, read WP guide on extending the Gutenberg paragraph block, and concocted some code. My item appeared on the same toolbar where “bold”, “italic” etc are. Only it was in a drop-down menu like “more”, where e.g. “<> Code” and other rarer items live. This worked, but was inconvenient: I wanted to press Ctrl+g (for some value of g) to invoke the command, instead of two clicks. And this is where my several attempts all have ended up in WSOD. And I killed 3/4 or a workday on extending the editor with just one freakishly simple item! Not bad given that I’m an NLU scientist, and PHP and CSS are not among my first-line skills. I used some minimal CSS when writing something like dynamic presentations of my work, but it was my first PHP code in the 50+ years of my life. And, of course, could find a much better use for these 5 hours I spent on my hack…
AFTER I discovered your plugin, I stopped using my half-backed hack, and reimplemented the same span wrapper in about 60 seconds Shortcoder! That was my point which I explained so confusingly.
Sorry again for being unclear; it relates not to your plugin but the stuff I tried before it. The more I use Shortcoder, the happier I am. Who would have thought that styling your writing can be that simple!
Also, I followed your advice and put all styles into a single SC that I place into a Gutenberg HTML block. This has an advantage that I can add styles unrelated to shortcodes: for example, the Paragraph block (most blocks, in fact) have “Custom Style” edit box. When I want a new style, I can just edit this “all-styles” shortcode and, since it’s already on every page, use it everywhere.
My site is not online yet, but your aakashweb.com and Shortcoder are both already in the footer credits on every page. And please ponder the idea I added to the note when sending you a coffee–I’m sure you can get a better exposure via networking. I know that Web design is a very competitive area, and it’s hard to live off it; and this plugin may be an advantage for you. It’s the best of both worlds: all Web people know some HTML, JS and CSS, and one does not need to know but any these things to create their own unique experience. No PHP and knowledge of WP guts required. IMO, you hit the very sweet, a golden spot in extending WP. Promote it, and it will promote you!
Sure thing I’m happy, thank you Aakash! Your plugin is simply awesome!March 14, 2020 at 12:14 pm in reply to: Style repeats in the page as many times as the shortcode is used #7418
Hi Aakash, yhanks for the response. Yeah, that’s a good idea, at least I would be able to keep all styles in one place without editing my plugin’s .php files.
Can even make [sc name="mysitestyles"/] and lump’em all.
Just wondering, if you don’t mind: is this a WP limitation (as in “WP shortcode API do not have that functionaliy”), or just an area an experienced programmer would rather not get into (as in “it has been known so fragile and inconsistent and varying between version so that’s a whole new can of worms?” 🙂 My adding of a <span> wrapper to the paragraph block menu was not a simple or intuitive operation, for sure! 🙂 And I could not even enable a keyboard shortcut for it without causing the WSOD, so I used it in two clicks instead of one keystroke. Ugh.
I’m asking just out of curiosity. I’m trying to understand the software that I am using at least to some degree.