Support » Fixing WordPress » Center widget in header.php

  • Resolved fedath


    Hello everyone!
    I’m relatively new to WordPress and facing an alignment problem with a shortcode from Shellbot’s Easy Image Display within my header.
    Basically, it sticks to the bottom-left while I would like it to be at the center (horizontally and vertically). I tried to had some <div align=”center”> or <center> code before <?php echo ….> and closing it after the ?>, but it has no effect.
    You can see the issue here:

    I guess it might not be really complicated but I can’t figure out a solution…

    <div class="page-wrap">
    	  <div id="memberlogin" class="leftsidebar"><?php echo do_shortcode('[sb_easy_image num="1" order="random" link="none" column="1" filter="include" ids="4562,4563,4564,4565,4566,4567"]'); ?>
    	<?php if (qtrans_getLanguage() == 'en') { ?>
    		<?php if ( !is_user_logged_in() ) { ?>
    			<a class="login-english" href="#login-english">MEMBER LOGIN</a>
    		<?php } else { ?>
    			<a href="/wp-login.php?action=logout&_wpnonce=733b6247fb">LOGOUT</a>
    		<?php } ?>
    		<div id="login-english" class="custom-login-box" style="display: none">
    			<form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
    				<label class="english-login">Username:</label>
    				<input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="20" />
    				<label class="english-login">Password:</label>
    				<input type="password" name="pwd" id="pwd" size="20" />
    				<label for="rememberme" class="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label>
    				<input type="hidden" name="redirect_to" value="/welcome-member/" />
    				<input type="submit" name="submit" value="Log In" class="button" />
    			</p><a href="<?php echo get_option('home'); ?>/wp-login.php?action=lostpassword">Lost your password?</a>

    Thank you in advance for your help!


Viewing 1 replies (of 1 total)
  • Well, I added the following code instead of the plugin shortcode, and the CSS made the rest of the work.

    	$images = array(
    	$image  = $images[array_rand($images)];
    	$output = "<img src=\"" . $image . "\" alt=\"Refresh browser for random image\" />";
    	echo $output;

    Thanks anyway 😉

Viewing 1 replies (of 1 total)
  • The topic ‘Center widget in header.php’ is closed to new replies.