• Resolved ccarlow

    (@ccarlow)


    I recently changed my theme from canvas to highend. In canvas I made box section with text but not that I am not using canvas I guess that feature doesn’t work and now I have sections all over my site pages that appear on my published/viewed pages as just plain text that starts with the code [box] and ends with the code [/box].

    see below and look at the reference link to a page where you’ll see it’s not converting – it’s located at the end of the content on the page link.

    [box]And that’s my story and I’m sticking to it![/box]

    MY QUESTION: Is there a way to get this to work again so I have box section that appear on the viewed pages? Do I have to go and remove all these bits of text shown as [box] on all the individual pages? Is there a plugin that will re-translate and convert the [box] to a boxed section on the viewed page. I hope this makes sense.

    thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If you knew what it did, you could write a shortcode to reproduce it.

    I imagine it’s something like

    <div class="box">Your text here</div>

    and then a bunch of CSS to style it.

    add_shortcode( 'box', 'ccarlow_box');
    function ccarlow_box( $atts, $content) {
       return '<div class="box">' . $content . '</div>';
    }

    Pop that in your functions.php

    The CSS would be something like

    .box {
       border-style: solid;
       border-color: black;
       border-width: 1px;
       padding: 1em;
    }
    Thread Starter ccarlow

    (@ccarlow)

    Thanks for the reply Steve. My problem is that when I changed my theme I was left with all these [box] code pieces throughout my website pages – they don’t resolve into a nice looking colored box around text – they simply appear on the page as this –>[box]text[box].

    What can I do to restore the box appearance without having to go to each page and edit the code individually? Anything?

    It’s a lot of work and I guess I’m looking for some quick fix.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    That’s why I gave you the shortcode — it will translate that [box] into actual content. It IS the quick fix. You can make a quick plugin or add the code to your (new) theme’s functions.php.

    Thread Starter ccarlow

    (@ccarlow)

    I misunderstood, sorry Steve
    I don’t know what to do with this code you wrote
    <div class=”box”>Your text here</div>
    is this what you perceive as the box code?
    basically when I enter the edit view – text panel I just see – [box]And that’s my story and I’m sticking to it![/box]
    not div tags
    should I replace the div tag references with the [box] and [/box] code references?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You need to either replace the shortcoode so your new theme supports it. I gave you the PHP for that above. OR you need to remove the [box]/[/box] shortcodes from your content. Those are the two choices.

    The PHP code would go in your theme’s functions.php file; you’d add the css via the customizer’s Additional CSS tab.

    Thread Starter ccarlow

    (@ccarlow)

    Ok Thx Steve!

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    @janaobx, if you need support then per the forum welcome please create your own new forum post. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[box] not converting to a boxed area on viewed page’ is closed to new replies.