thescribbler
Forum Replies Created
-
Forum: Hacks
In reply to: map_meta_cap() question.I’ve just realised how it works: map_meta_cap() returns an empty $caps array to WP_User::has_caps if the user wants to edit their own profile. The empty array does not trigger the foreach loop in WP_User::has_caps and thus current_user_can() will return true.
Forum: Themes and Templates
In reply to: Just can't increase all font size in TwentyTwelve child themeHi,
You’ve got your syntax slightly wrong.
body { font-size: 16px! important; font-size: 1.142857142rem! important; }
should be…
body { font-size: 16px !important; font-size: 1.142857142rem !important; }
The apostrophe should be right before important, not right after the value.
Forum: Hacks
In reply to: Question about a statement that uses the ? operatorYeah, it’s definitely a lesson learned. The code from the tutorial as it is displayed on the website makes the two single quotes appear like a double quote. In future I’ll be sure to download the source code and examine it directly in PSPad to avoid confusion. Cheers for your help.
Forum: Hacks
In reply to: Question about a statement that uses the ? operatorHi alchymyth,
Cheers for your reply. I think I understand your code – if the expression evaluates to
FALSE
then$text
is assigned an empty string for a value ($text = ''
).What has me confused about the original line of code is that the code to the right of the colon (that which is triggered when
FALSE
) appears to be"
rather than''
(i.e. a double quote rather than two single quotes).Are these two synonymous? Does a single double quote represent an empty string in the way that two single quotes does?
[EDIT]: I’ve just realised my mistake – it is two single quotes that I’ve just misread from the code as displayed on the tutorial’s webpage. I’ve downloaded the source code and can see that it is indeed two single quotes. Doh! Cheers for you help!
I found the answer, so if anyone else is looking for this, here it is:
WordPress stores each image as its own post. The title of the image is the title of the post, the caption of the image is the excerpt and the description of the image is the content of the post.
So you can assign each of these to variables like this (code must be placed inside the loop):
$title = get_post(get_post_thumbnail_id())->post_title; //The Title
$caption = get_post(get_post_thumbnail_id())->post_excerpt; //The Caption
$description = get_post(get_post_thumbnail_id())->post_content; // The Description
Once again, apologies if this has been done to death already – it took me ages to find the answer.
I found the solution here:
Forum: Your WordPress
In reply to: My community powered by WordPress with full vBulletin integrationHmmm…I guess beauty is in the eye of the beholder! I think it looks nice – the aesthetic matches the function of the site perfectly. Two things:
1. I reckon you could do with more content on the front page, maybe double (or triple) the section with the three images beneath the main top section. There’s loads of room and at present I reckon you’re selling yourself short with just one row of three.
2. I don’t get tag clouds! I gather they’re for SEO purposes but I can’t really see the need and IMHO they needlessly take up visual real estate whilst offering little real value or benefit to the visitor.
These aspects are personal taste though so I guess there’s no real right or wrong, only preferences…
Forum: Your WordPress
In reply to: My community powered by WordPress with full vBulletin integrationVery nice site! Design is clean and crisp. I’ve recently started learning electronic music production so will definitely keep an eye on your site!
Forum: Your WordPress
In reply to: In My Blog (website) Iam Not seaing Anything.Hi Ravi,
Have you changed or modified the name of the theme folder?
Hey Jeff,
IE is notorious for playing nasty with CSS. If you google ‘CSS Internet Explorer bugs’ or something similar you should find some good info. Also, try googling ‘float based layouts’ – I had a quick peek at your CSS and it appears that many elements within your design have not been floated, which may be causing some of the problems. From what I’ve read about CSS, it’s generally a good idea to float every element.
Forum: Themes and Templates
In reply to: blue outline on photosThe best way to isolate what you’re looking for is to use Firefox, download the web developer’s tools, click on information > display element information and then hover your mouse over the element you need info on. FF will display the location of that element both within the toolbar below below the URL and also in a yellow box that appears when you click on the element itself…
Forum: Themes and Templates
In reply to: blue outline on photosYour stylesheet will be a file with a suffux of .css placed within your theme folder that controls the layout/style of the HTML code. There may be more than one CSS file in the folder relating to various sections of the theme, but (generally) the main one will be titled style.css or some similar variation…
Forum: Your WordPress
In reply to: How’s this for a non-blog looking WordPress powered site?Congratulations, it’s a great looking website – not blog-like at all! I’m new to all of this (I’m currently designing my first site) but the more I learn about wordpress, the more I like it! There’s not much you can’t do with it if you use your imagination, as you clearly have!
Petitshoo: If you start a new thread in a relevant section and post a link to your site, along with a description of what you’re trying to achieve, you’ll probably get some helpful advice:-)
Forum: Themes and Templates
In reply to: show only posts of category x on pageWhen you say it doesn’t work, what exactly is happening?
Forum: Themes and Templates
In reply to: Why are some pages pushed to the right?Hi,
Your theme seems to generate a div class based on the date and page id. Try adding .wordpress { margin: auto; } to your CSS…
Forum: Themes and Templates
In reply to: Category page separate from category archive pagePerfect! Thanks for your help Michael…