WordPress.org

Support

Support » How-To and Troubleshooting » Full image code not showing in widget ad.

Full image code not showing in widget ad.

  • Hi, I am adding my logo to my side bar and have the widget activated. I added this code so others could copy it and past it to their Blog and share my logo:

    <strong><center><a href="http://www.backroadsliving.com/" title="Back Roads Living"><img alt="Back Roads Living" src="http://www.backroadsliving.com/wp-content/uploads/2013/03/Back Roads Image.jpg"/></a><center> </center>
    <center><textarea id="code-source" rows="3" name="code-source"><center><a href="http://www.backroadsliving.com/"><img border="0" src="http://www.backroadsliving.com/wp-content/uploads/2013/03/Back Roads Img.jpg"/></a></center></textarea></center></center></strong>

    and it works great except when someone else copies it from my actual blog page they don’t get the full url. all they get is,

    <strong><center><a href="http://www.backroadsliving.com/"><img border="0" src="http://www.backroadsliving.com/wp-content/uploads/2013/03/Back Roads Img.jpg"/></a></center></strong>
    [Please post markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    this doesn’t direct them to my Blog. No image will come up with this code. Why isn’t the entire code being shown on the Blog?

    Any help will be appreciated.

    Thank you .

    C. Keys.

Viewing 15 replies - 1 through 15 (of 27 total)
  • esmi

    @esmi

    Forum Moderator

    What widget are you using?

    It doesn’t have aname, just a standard text widget that came with the download of WordPress.
    .

    esmi

    @esmi

    Forum Moderator

    All of the widgets have names. 🙂 Is it the Text widget from Appearance -> Widgets?

    Yes. 🙂

    esmi

    @esmi

    Forum Moderator

    Can I ask what theme you are using and whether you have a custom CSS plugin (eg there’s such a module in the Jetpack plugin) installed?

    I am using twenty eleven with a child theme. Yes, Custom CSS is activated in Jetpack.

    [No bumping, thank you. Try to be patient.]

    esmi

    @esmi

    Forum Moderator

    Oh – excellent! Only you have two issues in the old markup:

    1. You cannot add markup to content (either in a widget or in a page area) without a web browser immediately parsing that markup. The only way around this is to encode the < and > tags so that the browser doesn’t see the markup as… well, markup and will display it “as is”.

    2. Some of the formatting markup you were using is old and deprecated. Moving this all out to CSS will give you leaner markup that will be far easier to style from theme to theme.

    Try adding the following to your Text widget:

    <a class="brl-image-link" href="http://www.backroadsliving.com/"><img alt="Back Roads Living" src="http://www.backroadsliving.com/wp-content/uploads/2013/03/Back Roads Image.jpg"/></a>
    
    <textarea class="brl-image-link" id="brl-code" rows="3"><code>& lt;a href="http://www.backroadsliving.com/"& gt;& lt;img border="0" src="http://www.backroadsliving.com/wp-content/uploads/2013/03/Back Roads Img.jpg"/& gt;</a></code></textarea>

    and remove all of the spaces after & in the second block. Next, go to your Custom CSS module and add something like:

    a.brl-image-link,
    textarea.brl-image-link {
    display:block;
    margin:0 auto;
    font-weight:bold
    }

    and see how that looks.

    esmi

    @esmi

    Forum Moderator

    Edited the above code to try and stop the forum’s parser from breaking the encoded tags. *sigh*

    I can’t seem to get the text code you sent to copy without the whole page copying. Can’t just copy the code in the window. What am I doing wrong?

    esmi

    @esmi

    Forum Moderator

    Not sure. It could just be due to mouse control. Try http://pastebin.com/JeERp8EY instead.

    Just got the code and going to try now.

    To add to the module do I just click configure and add the code above to the bottom or something? I am not very familiar with the css stuff. Sorry for being so green in this. I am laernign this as I go. Still a long way to go!

    esmi

    @esmi

    Forum Moderator

    Just paste everything from the pastebin into the Text widget “as is”.

    I edited the CSS under Apperance>Edit CSS and added the code. The CSS ask me to remove the “a” in the first line and the “textarea” in the second line. I did this and added the code for the image but still can’t get it to work?

    What about the css? Did I do it right?

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Full image code not showing in widget ad.’ is closed to new replies.