Forum Replies Created
-
AuthorPosts
-
unkleeMember
OK, thanks for your help.
unkleeMemberHi Brad, thanks again.
I tried the code your have referenced again, and it still did nothing. So I've been thinking about why it works for you but not for me.
My PHP is rudimentary, but it is clear what this code does - it searches for menu links and then adds extra code before the final "/a" tag to display the description as well as the name of the link. I think the "str_replace" function must be correct as it works for you, so I'm thinking the problem must be in the "if" test, which is:
if( 'header' == $args->theme_location && ! $depth && $item->description )
Now this is where I start to struggle. I'm guessing what this does is look for any header array which has as its arguments theme_location, $depth and $item->description, and this identifies the menu we want to display. My understanding is that:
theme_location is set for each menu location, and if not set a default menu is shown.
$depth is the number of levels in the menu hierarchy.
$item-> means the item we are looking at is the menu description.That all seems straightforward, except those parameters appear in a wp_nav_menu function, and I don't understand what 'header' actually is, where I find it, and how any of those arguments could be "wrong" for me but "right" for you? I also don't understand the "!" in the code.
Sorry to bug you, but have you any ideas please?
unkleeMemberThanks Brad, I'm sorry to delay replying, but I thought I had posted a reply but I must have done something wrong.
That reference was one of the ones I obtained via Google, and unfortunately, I couldn't get it to work at all - there was still only the menu item name, and not the description. The one I found on this forum was one of only two I found that displayed the description, but both displayed it first.
For the record, this was the entire code:
add_filter('walker_nav_menu_start_el', 'description_in_nav_el', 10, 4); function description_in_nav_el($item_output, $item, $depth, $args) { return preg_replace('/(<a.*?>[^<]*?)</', '$1' . "<span class=\"menu-description\">{$item->attr_title}</span><br /><", $item_output); }
Do you, or anyone else, have any ideas how to make the name appear before the description please?
unkleeMemberI wonder, Victor Font, if you are still reading this, and can help me style this please. I have inserted a graphic using the method you showed me, but both graphic and title align at the bottom, whereas I'd like them to centre align. I can't for the life of me find the CSS to do this. Are you or anyone able to give me a clue please? Thanks.
unkleeMemberHi Victor, thanks so much. That is very cool. There is so much to know in CSS. I've never used "before" before, but you've set it out very clearly, thanks.
I was even able to change the content line to:
content: url('http:xxxxxxx.jpg')
and put a graphic in there if I want that. Thanks again.unkleeMemberOK thanks. I guess that would do the same - though more directly - than the Content aware sidebars plugin. Thanks for your advice.
unkleeMemberJust for the record, I came to the conclusion that fiddling with the background image is just too much trouble, so I got the result I wanted by setting up a new widget area on the front page and adding a photo to that. It can sit in the same spot and is totally responsive without a lot of mucking around. So far in trialling it, I haven't found any problems.
unkleeMemberThanks for your help. But even with a picture 1800 x 600, it only showed half the width on my screen. The only way I could get it to show the full width was to reduce the browser window's height so it was just showing the full picture, nothing below it - then the full width was showing. I even tried putting a half size picture on a white background to make it 1800 x 600 and the picture didn't show well.
I think this convinces me that the stretch graphic idea isn't a good one unless the picture is pretty abstract or homogeneous (like a picture of sky or an aerial photo of a forest), and for most people converting to a standard graphic is better - as the many discussions here attest.
I'm a little sorry to come to that conclusion, but the present design is too unpredictable for different screen sizes, and being able to show a site well on different screen sizes is an essential for WordPress these days and one of the reasons I purchased Genesis in the first place.
Thanks for your help, it enabled me to come to this conclusion.
unkleeMemberHi, I want to control my background image too.
1. I can't find any information on the optimum size for this image, or the optimum shape (i.e. width = 2 x height, or whatever). I used a 700 x 350 jpg as a trial but it showed only a small part and magnified that greatly, even though the full page width is much bigger than 700.
2. When you say we can reset the margins, can we use that to reduce the height, or show more or less at the top and/or show more or less at the bottom. i.e. does this work in all cases? (I will experiment, but any guidance would help thanks.)
A quick hint would help thanks.
PS Kirsten, the picture and the site look really good!
unkleeMemberYes, I agree, it looks good. What size background image did you use on the home page?
unkleeMemberHi Victor, thanks for your reply. But I'm sorry, I don't understand how to remove the /blog without moving WordPress out of the /blog directory.
unkleeMemberHi Moody, thanks for your thoughts. That confirms what I'd been thinking overnight. It's a pity, because the Ambiance theme looks great with its attractive fonts and minimalist look, but I'll find something else. I think StudioPress could provide a little more information on what options and features are available with each theme, as it took me quite a while to find this out about Ambiance, and I was almost going to buy it. Anyway, thanks again.
unkleeMemberPS I have just read a review of Ambiance Pro which says it doesn't have a sidebar option. Is that so?
unkleeMemberHi Susan, thanks for your reply.
I thought it would be pretty flexible, but I wanted to check. I am not worried about doing a little coding, but I want to make sure I get the "right" child theme. My first choice is Ambiance Pro, because it looks beautiful and minimal, but:
(1) there is only one example in the Showcase so I have little to go on,
(2) searching the forum for this theme seemed to show that few who asked a question about it ended up using it, which is a slight concern,
(3) it is supposed to be a photography theme, whereas I want to use it as a normal website & blog theme with some "related post/page" links with thumbnails to facilitate navigation to important pages, and
(4) I want to have a static home page with links to other pages, then a blog front page with links to both latest and most important blog posts, and I wasn't sure if all themes could do that.But from what you have said, I should be able to manage it. The alternative is to use a magazine theme and simplify it slightly, but I think that would be more work.
Thanks again.
unkleeMemberHey Brad, thanks heaps, that was amazingly quick.
I should be able to manage 1 & 3.
Re 2: is that standard for all WordPress? I guess that obviates the need to generate images on the fly as the page is loaded? My present site is a hand coded website with a WordPress blog, and uses images that are stored in 3 separate places - in a graphics folder I have created, on Picasa and uploaded to WordPress. I guess I'm going to have a lot of work moving some of them around to the right place.
I can see this upgrade is going to be time-consuming!
-
AuthorPosts