How To Enter Text In The Sidebar Header / Wordpress

by zannix
5 replies
  • WEB DESIGN
  • |
Hi guys, this is my website: Apartments in Croatia

If you take a look at the right sidebar, you will notice a changing gif image. And above that, there's a little blue area, that would be perfect for a title.

However, nowhere in the theme settings can I insert a title here... So how can I do this manually?

Keep in mind that I'm not an expert on html, but I can follow steps if you can lay them out for me!

Big thanks and appreciation in advance!
Zannix
#enter #header #sidebar #text #wordpress
  • Profile picture of the author AnniePot
    I've just had a look at your sidebar code:

    <!-- Sidebar -->
    <div class="title"> <div class="corner-left"> </div>
    <div class="corner-right" style="width:251px;">
    <h2>&nbsp;</h2> </div> </div> <div class="clearer"></div>
    <div class="sidebar-top-box"> <p></p> </div>
    <div style="clear:both;"></div> <div id="sidebar-left" style="width:258px;">
    <div class="Categ"> <ul> <li id="text-4" class="widget widget_text">
    <div class="textwidget"><IMG SRC="http://www.apartmentsincroatia.org/apartments-gif.gif" ALT="some text" WIDTH=250 HEIGHT=200></div>
    </li><li id="video-4" class="widget widget_video">
    <h2 class="widgettitle">VIDEOS OF CROATIA</h2>
    <object type="application/x-shockwave-flash" width="250" height="200" data="http://www.youtube.com/v/UOkpJZfll20&rel=0"><param name="movie" value="http://www.youtube.com/v/UOkpJZfll20&rel=0" /><param name="wmode" value="transparent" /><param name="quality" value="high" /></object></li><li id="video-5" class="widget widget_video"><h2 class="widgettitle"> </h2><object type="application/x-shockwave-flash" width="250" height="200" data="http://www.youtube.com/v/7bwiiys4Vsk&rel=0"><param name="movie" value="http://www.youtube.com/v/7bwiiys4Vsk&rel=0" /><param name="wmode" value="transparent" /><param name="quality" value="high" /></object></li><li id="text-5" class="widget widget_text"><h2 class="widgettitle"> </h2> <div class="textwidget"></div> </li><li id="search-3" class="widget widget_search"><form role="search" method="get" id="searchform" action="http://www.apartmentsincroatia.org/" > <div><label class="screen-reader-text" for="s">Search for:</label> <input type="text" value="" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form></li> </ul> </div> </div> <!-- END Sidebar -->

    Find the line:
    <h2>&nbsp;</h2>
    Replace the &nbsp; (creating the single space), with your headline,
    keeping the <h2> tags intact.
    {{ DiscussionBoard.errors[5217593].message }}
    • Profile picture of the author zannix
      Hey thanks for pointing that out! However, if I edit the sidebar.php inside wordpress theme editor, I cannot find these lines... what method do you suggest for editing the code directly?

      It appears that the code shown in wordpress built-in editor (under appearance tab) is only like a "general code" and you can't really change specifics :/

      Thanks again, Zannix
      {{ DiscussionBoard.errors[5219157].message }}
  • Profile picture of the author RobKonrad
    In wordpress, there's a "Widget" area. In that area, you usually can enter the widget title once you click on a widget to edit the content?

    Did you try that already?

    Cheers,
    Rob
    Signature
    ================================================== ===
    This blog is awesome: http://www.robkonrad.com/blog. Read it.
    ================================================== ===
    {{ DiscussionBoard.errors[5221396].message }}
    • Profile picture of the author drewhowell21


      If so, there's a div in your sidebar.php with a class of "corner-right". As of now, it has an empty <h2> tag. You can enter text in there, like i did, and it will show up. Hope that helped fixed the problem.
      {{ DiscussionBoard.errors[5222081].message }}
      • Profile picture of the author zannix
        Originally Posted by drewhowell21 View Post



        If so, there's a div in your sidebar.php with a class of "corner-right". As of now, it has an empty <h2> tag. You can enter text in there, like i did, and it will show up. Hope that helped fixed the problem.
        Exactly! I want to accomplish just that. But I don't really know where to insert the text exactly. When I edit the sidebar.php in wordpress editor, I get this code:


        <?php
        /**
        * @package WordPress
        * @subpackage Default_Theme
        */
        ?>
        <?php
        global $post;
        $enableadspace = get_option('marketing_enableadspace');
        $adsensecode = get_option('marketing_adsensecode');
        $imagelocation = get_option('marketing_imagelocation');
        $destinationurl = get_option('marketing_destinationurl');
        $adbox = array();
        $adbox['sidebarwidth']=258;
        ?>
        <?php
        if($enableadspace == 'on')
        {

        if(showsinglead())
        {

        $adbox=display_marketing_ad(0,'','','');
        }
        else
        {
        $adbox = display_marketing_ad(1,$imagelocation,$destination url,$adsensecode);
        }
        }?>

        <div id="sidebar" style="width:<?php echo $adbox['sidebarwidth'].'px'; ?>;">
        <!-- Sidebar -->
        <?php echo $adbox['sidebar']; ?>
        <div style="clear:both;"></div>
        <div id="sidebar-left" style="width:<?php echo trim($adbox['sidebarwidth']).'px'; ?>;">
        <div class="Categ">
        <ul>
        <?php /* Widgetized sidebar, if you have the plugin installed. */
        if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Sidebar") ) : ?>
        <h2>Categories</h2>

        <?php wp_list_categories('show_count=1&title_li='); ?>

        <?php endif; ?>
        </ul>
        </div>

        </div>
        <!-- END Sidebar -->

        </div>


        Could you point out exactly where and how should I insert this text?
        {{ DiscussionBoard.errors[5222682].message }}

Trending Topics