Forum Replies Created
-
AuthorPosts
-
nomisMember
Thank you so much Victor that solved the problem 🙂
nomisMemberSo this is the compete code I've got at the moment Victor, but it's giving me"
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'widgets1' not found or invalid function name in /Users/simondegay/Sites/sample/wp-includes/plugin.php on line 525
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'widgets2' not found or invalid function name in /Users/simondegay/Sites/sample/wp-includes/plugin.php on line 525
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'widgets3' not found or invalid function name in /Users/simondegay/Sites/sample/wp-includes/plugin.php on line 525
genesis_register_sidebar( array( 'id' => 'my-widget-one', 'name' => __( 'My Widget One', 'sample' ), 'description' => __( 'This is a widget area number one', 'sample' ), )); genesis_register_sidebar( array( 'id' => 'my-widget-two', 'name' => __( 'My Widget Two', 'sample' ), 'description' => __( 'This is a widget area number two', 'sample' ), )); genesis_register_sidebar( array( 'id' => 'my-widget-three', 'name' => __( 'My Widget Three', 'sample' ), 'description' => __( 'This is a widget area number three', 'sample' ), )); add_action ('genesis_before_content', 'widgets1'); add_action ('genesis_before_content', 'widgets2'); add_action ('genesis_before_content', 'widgets3'); add_action ('genesis_before_content', 'my_widgets'); function my_widgets() { if ( is_page( 2 )) { echo '<div class="my-widget-container">'; if ( is_active_sidebar( 'my-widget-one' ) ){ genesis_widget_area( 'my-widget-one', array( 'before' => '<div class="widgety widget1 widget-area">', 'after' => '</div>', )); } if ( is_active_sidebar( 'my-widget-two' ) ) { genesis_widget_area( 'my-widget-two', array( 'before' => '<div class="widgety widget2 widget-area">', 'after' => '</div>', )); } if ( is_active_sidebar( 'my-widget-three' ) ) { genesis_widget_area( 'my-widget-three', array( 'before' => '<div class="widgety widget3 widget-area">', 'after' => '</div>', )); } echo '</div>'; } }
nomisMemberThe problem is Victor not that I want to add a div to a widget area, but I want to enclose three widgets in one div.
Here's the code I'm using:functions.php
genesis_register_sidebar( array( 'id' => 'my-widget-one', 'name' => __( 'My Widget One', 'sample' ), 'description' => __( 'This is a widget area number one', 'sample' ), )); genesis_register_sidebar( array( 'id' => 'my-widget-two', 'name' => __( 'My Widget Two', 'sample' ), 'description' => __( 'This is a widget area number two', 'sample' ), )); genesis_register_sidebar( array( 'id' => 'my-widget-three', 'name' => __( 'My Widget Three', 'sample' ), 'description' => __( 'This is a widget area number three', 'sample' ), )); add_action ('genesis_before_content', 'widgets1'); add_action ('genesis_before_content', 'widgets2'); add_action ('genesis_before_content', 'widgets3'); function widgets1() { if ( is_page( 2 )) { genesis_widget_area( 'my-widget-one', array( 'before' => '<div class="widgety widget1 widget-area">', 'after' => '</div>', )); } } function widgets2() { if ( is_page( 2 )) { genesis_widget_area( 'my-widget-two', array( 'before' => '<div class="widgety widget2 widget-area">', 'after' => '</div>', )); } } function widgets3() { if ( is_page( 2 )) { genesis_widget_area( 'my-widget-three', array( 'before' => '<div class="widgety widget3 widget-area">', 'after' => '</div>', )); } }
style.css
.widgety { background: #53416D; color: #DCDCDC; float: left; width: 33.33333%; padding: 30px 25px 55px 25px; text-align: center; } .widget1 { padding-left: 50px; } .widget2 { background: #4B3A63; } .widget3 { padding-right: 50px; }
nomisMemberThe nice person Julia Sydnor at StudioPress fixed it for. I had inadvertently added a couple of line of CSS.
nomisMemberYes I eventually chose a new hosting company in China which uses Unix. I have to say, that generally speaking, working with China based hosting companies seems to be a bit of a nightmare. The company I'm trying to host the site with now is called sino hosting. Their customer service is the pits and they want to charge me an extra £200 ($259) per year just to enable cPanel. I've even been told by the Chinese Domain registrar that I need to register the DNS address - Aaaaaargh.
I think all future Chinese websites will be hosted in the US or UK.
nomisMemberThank you soooooo much Victor, I was really pulling my hair out with this one.
nomisMemberanyone?
nomisMemberThank you so much Neil, that worked perfectly. Have a merry Christmas 🙂
nomisMemberThanks for the reply Victor, but unfortunately a:active only targets links on mouse-down, and a:visited only targets links that have been previously visited. Neither indicate which page section the visitor is viewing NOW. In the past, menu links would just link to a separate page, so it was just a matter of hard coding the menu indicator into the page itself, but because all these sections are on the same page, it's a different matter. I don't think pseudo classes are the answer here - even Studiopress Support seem stumped on this one.
nomisMemberI thought the idea of normalize.css was to stop this sort of thing from happening. Anyway, adding the code below to the styles.css seems to solve the problem. Thanks for your swift reply 🙂
a:hover, a:active, a:focus { outline: 0; }
Actually found this in the reset. I wonder why it's there:
a:focus{outline:thin dotted}
I just changed it to:
a:focus{outline: 0}
nomisMemberIt's just that I'd rather type this sort of thing into my code editor (with it’s code completion, linter etc.) rather than directly in the text widget, but perhaps I'm just being too fussy. I guess I can just cut and paste to see the result.
nomisMemberHere is an example of the sort of thing that I will put into a text widget:
<p> <img src="http://rise-webdesign.com/wp-content/uploads/2015/11/Logo_2.png" height="403" width=“386"> </p> <p class=“raytype"> Ray International Cultural Communication Ltd. </p> <h2 class="thumbs">What Do We Do?</h2> <img src="http://rise-webdesign.com/wp-content/uploads/2015/11/small_1.png" class="thumb"> <img src="http://rise-webdesign.com/wp-content/uploads/2015/11/small_2.png" class="thumb"> <img src="http://rise-webdesign.com/wp-content/uploads/2015/11/small_3.png" class="thumb"> <img src="http://rise-webdesign.com/wp-content/uploads/2015/11/small_4.png" class="thumb"> <img src="http://rise-webdesign.com/wp-content/uploads/2015/11/small_5.png" class="thumb"> <img src="http://rise-webdesign.com/wp-content/uploads/2015/11/small_6.png" class="thumb"> <img src="http://rise-webdesign.com/wp-content/uploads/2015/11/small_7.png" class="thumb"> <img src="http://rise-webdesign.com/wp-content/uploads/2015/11/small_8.png" class="thumb"> <p> <a class="button clear white" href="http://rise-webdesign.com/sub-page-11/">Our Work</a> <a class="button clear white" href="#front-page-5">Lets Talk</a> </p>
nomisMemberThanks braddalton. Little bit confused, if I'm honest, but I think that the gist is that it's easiest to continue just entering the HTML directly into the Text Widget.
nomisMemberOkay, but is the content of the widget editable in an actual file. When you insert a text widget, is an editable file generated or is it all generated from deep within the backend?
nomisMemberThis reply has been marked as private.nomisMemberYes this is a WP site:
http://builtwith.com/You don't need a plugin, just use HTML:
<video preload="auto" autoplay="autoplay" loop="loop" style="top: -149px; left: 0px; bottom: 0px; right: 0px; width: 100%; height: 641px;object-fit: cover;display:block;position:relative;”> <source src="http://makeupartistryonlocation.com/wp-content/uploads/ 2014/05/maol.mp4.mp4" type=“video/mp4"> </video>
nomisMemberWow, so many responses. Thank you all very much. I’m beginning to realise that this is a very supportive community 🙂
@MoodyRiviera
Don’t be too impressed by my desire to learn. I also expressed a desire to learn Chinese a few years ago, but so far I only know the words for “beer” and “condom.” You may be surprised how much I was able to achieve using those two words during my trip to Wuhan last year? I think the private online tuition is a great idea, but I am worried that it may be a wee bit out of my price range. It also occurs to me that saying that I want to learn everything about Genesis not only makes me sound like a bit of an arse, but also a religious zealot lol.@Summer
I think this is a really good point Summer, I came straight to Genesis without stopping off at WordPress, so maybe some general tuts on customising WP themes would be a good idea. I’ve only tried Lynda so far. I’m a bit reluctant to try Treehouse because I have a fear of heights. And based on my present Genesis frustration, I fear I may be tempted to jump 😉
@arijuki
Wow, thanks there arijuki, I hadn’t seen those Bill Erickson tutorials before. I think you offer some very useful advice here 🙂@Summer
Yes, Mr Rand-Hendriksen really seems to know his stuff. I actually did work through this tutorial recently ,and also:Moving WordPress with WP Migrate DB
Up and Running with Genesis for WordPress
Customizing Themes with Genesis for WordPress
Installing and Running WordPress: MAMP
WordPress Plugins: Contact FormsSo I think we may need to start entertaining the possibility that I’m stupid, lazy, or both lol. I just knew it was a mistake to leave the chicken abattoir and go to study graphic design 🙂
Like Ma told me, “Likes of us got no place goin' to London ’n’ mixing with all those highfalutin design folks. afor ya know it y’all be on that there interweb, jabberin’ with them there Genesis folks. Weez been slaughtering’ chickins fur three generations. Folks like us gotta know our place.”
si
nomisMemberI want to do everything in functions. On this occasion I’m not looking for the answer to a specific coding problem, more some advice on a recommended study path, so that I can master the PHP side of Genesis, and a thus no longer have to ask so many questions.
nomisMemberHave attempted to copy pasta.
Tagliatelle now jammed in photocopier.
Is copying pasta essential to working with Genesis?nomisMemberSuperb !!!
This solved my problem perfectly - and I learned something 🙂
Thanks soooooooooo much Graham.si
-
AuthorPosts