- This topic has 8 replies, 2 voices, and was last updated 7 years, 7 months ago by Jorge.
-
AuthorPosts
-
September 16, 2016 at 7:46 pm #227107Jorge
Hi Tom,
I would like the banner I placed on [wp_head] GP-hook to be displayed centered. Now, it’s shown aligned-left, no matter what I edit!
Please visit http://www.chorizosibericos.es to check.
Thanks once again,
Jorge
September 16, 2016 at 10:51 pm #227128JamalHi
You can enclose your banner like this
<div class="div-centered"> YOUR BANNER </div>
Then the following css
.div-centered { text-align: center; }
I think that should work.
September 17, 2016 at 3:35 pm #227341JorgeHi Jamal,
Thanks for your suggestion. I’m afraid I would need somo more advice on what you mean by ‘enclosing’. My fault, for I didn’t specify which plugin I’m using: Soliloquy Lite
I presume I am to enclose it into CustomPHP, but how do you think I should do it?
Many thanks.
September 18, 2016 at 1:28 am #227379JamalHi
By enclose i meant put it inside a div. Just replace “YOUR BANNER” with the shortcode you were using and then add the css. That is it, sorry if i confused you by using the wrong terminology.
On a side note, see Tom’s advice on using wp_head hook for other things than scripts.
Please don’t hesitate to ask if you would like more clarifications.
September 18, 2016 at 2:41 pm #227521JorgeThanks again,
Let me tell you what I did:
I added CSS in Simple CSS plugin:
.div-centered { text-align: center; }
I introduced the code you provided in Simple PHP plugin, replacing “YOUR BANNER” with the appropiate plugin shortcode:
<div class="div-centered"> [soliloquy id="322"] </div>
I first introduced it before the closing PHP tag “?>”, but got an error. Then placed it right afterwards, and this is the result: http://www.chorizosibericos.es
I must be doing something wrong. Please, pardon my inability in terms of code, but I’m afraid I have to ask for your advice once more π
Thanks so much.
September 18, 2016 at 3:30 pm #227534JorgeYou may now see a confusing setup; WordPress seems to be undergoing issues with uploading/retrieving the images from the library. As for now, I’m not able to upload or access to them. Let’s wait till WP comes back to normal, I’ll keep you posted π
September 18, 2016 at 6:47 pm #227568JorgeNot WP issues, seems I’m having trouble with Javascript or something. Let me come back to you as this is solved, whether to go on with the thread or to communicate what the problem was, to whom might be interested.
Please, pardon this inconvenience.
September 18, 2016 at 11:34 pm #227609JamalIt’s not an inconvenience at all, i’m more than happy to help. Put the code directly in the before header hook, no need for Simple PHP plugin. This is how it should look like unless you had some other code there previously.
http://www.zimagez.com/zimage/screenshot-2016-09-19-082327.php
September 20, 2016 at 4:03 pm #228159JorgeHi Jamal,
Everything’s back to normal, and you were outright spot on:
I added this CSS in Simple-CSS plugin:
.div-centered { text-align: center; }
Introduced this code in [Before Header] hook:
<div class="div-centered"> [soliloquy id="397"] </div>
And the banner is now displayed perfectly centered, no issues whatsoever: http://www.chorizosibericos.es
All trouble was due to my blunder when placing the code in the wrong place. Talked to Soliloquy Plugin owners, they offered to kindly test any conflict between plugins, and Custom-PHP turned out to generate issues with Soliloquy. But that wasn’t actually it, but my confusion with the code I had introduced in it.
My apologies, you were obviously right from the very beginning. Thanks so much, I very much appreciate your so kind attentions π
Best,
Jorge
-
AuthorPosts
- You must be logged in to reply to this topic.