• Resolved hebhansen

    (@hebhansen)


    Hey Snippets

    Your awesome plugin comes with a sample HTML snippet that insert present year with a shortcode.

    Snippet

    <?php echo date( 'Y' ); ?>

    Shortcode

    [code_snippet id=4 network php format]

    It works well but also adds linebreak before and after, or clear both etc. Can I somehow show this inline for my copyright line thx.

    Just to clear up confusion. First 2023 is entered manual. Second is this snippet, that hopefully flips after new year, and then showing an always updated copyright line.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter hebhansen

    (@hebhansen)

    Here is inspector source w css. I guess I just need to at a class in the P tag and then in css do a class call and display: inline;

    So question is, can anyone add a class to the above php. I do not know php, so sorry to have to ask…

    Plugin Author Shea Bunge

    (@bungeshea)

    I recommend removing format from the shortcode – it will automatically add in paragraphs/line breaks:

    [code_snippet id=4 network php]
    Thread Starter hebhansen

    (@hebhansen)

    Your my new best friend Shea… Thank you so much. I guess tunnel vision kicked in… I wish you the best of christmas, new year and the rest of your life!

    Just wondering, what is id=”4″ and is there an attribute overview somewhere for these shortcodes so that I can use and abuse them all over my site?

    Henrik

    Plugin Author Shea Bunge

    (@bungeshea)

    id=4 and network just tell WordPress which snippet you want to include. The only other attribute we currently support is shortcodes, which will allow you to include other shortcodes within the shortcode contents.

    Thread Starter hebhansen

    (@hebhansen)

    Alright. Thx. I’m not absolutely clear on how this pans out, but I will investigate further as needed. Pulling system values like year is just awesome and looks like this now….

    I will mark as resolved, thx

    Plugin Author Shea Bunge

    (@bungeshea)

    Feel free to post with any other questions around this if you encounter anything further.

    Thread Starter hebhansen

    (@hebhansen)

    Thank you !

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Insert Year HTML Snippet, Remove line break’ is closed to new replies.