wpmhweb
Forum Replies Created
-
Thank you, it worked like a charm!
But this is my question how did you figured it out? I am interesting on learning, do you know some online resources I can use besides Codex?
Thanks again.
Hi,
Thank you again, from the previous link to the codex page I was able to build this:<?php $key_1_value = get_post_meta($post->ID, 'wpcf-huge-image', true); ?> <?php if($key_1_value != '1') { ?> hello 1 <?php } elseif($key_1_value != '2') { ?> hello 2 <?php } ?>To create a custom field I am using the Types plugin and I set option #1 with the value of ‘1’ and option #2 with the value ‘2’ and you can see in the $key_1_value variable above and it works somehow, the problem I am having now is that it works backwards. When I set from the editor the option #1 it display “hello 2” and when I set the option #2 it displays “hello 1”.
Can you figure out what I am doing wrong?
Thank you so much.
PS: I am still new writing conditional statements.
Thanks,
But it doesn’t show me how to check for values. I have no problem showing a custom field with a key name. The problem I have is that I have 1 key e.g., CAR and CAR has 3 values 1, 2, 3 (3 options), so I need something like this:
If custom field is CAR with value of 1 then “do this”
If custom field is CAR with value of 2 then “do this”
If custom field is CAR with value of 3 then “do this”Forum: Plugins
In reply to: [HTTP 410 (Gone) responses] How to fix database errors coming from WP-410So far, so good.
Forum: Plugins
In reply to: [HTTP 410 (Gone) responses] How to fix database errors coming from WP-410Thank you for the response!
I just upgraded to the latest update and just in case I deactivated/activate.
I also have a error log plugin that I just cleared, hopefully it will not show me the error again.
Thanks,
PS: I’ll wait to see if no error shows up and I will mark this topic as solved.
Thanks,
It should be “obvious” but some plugins don’t follow the rules. I just wanted to double-check.
Thanks again,
Forum: Plugins
In reply to: [Widget Context] Errors and notice pfro debugingThank you!
Forum: Plugins
In reply to: [Widget Context] Errors and notice pfro debugingSame here, cannot figure out what’s wrong!
Thanks
Hey! Thank You. Worked like a charm!
Forum: Themes and Templates
In reply to: I am having server errors, so I'm wondering if this code is OK?Thank you for your reply!
Forum: Hacks
In reply to: how to check post category and display latest post?Hello manishkrag,
This is what I need: When a visitor loads a new post, I would like WordPress to check the category of the post the visitor just loaded. Then depending in which category that post is, I would like to show the latest post for that particular category.
Thanks,
Forum: Installing WordPress
In reply to: Transferring DNS after completing setting up WordPressThanks, but I don’t think this applies to the problem. The problem is that Godaddy will not let me create a WordPress account without a DNS name because the account has a dynamic IP. Oh and the hosting is Linux based.
So, I’d also been thinking on getting a free DNS name e.g., no-ip.com, use this a temp DNS and then when the website is done change it to the DNS I want to use. Could this work? Will this be a problem with permalinks or anything else? The new website will only contain several page a nothing else.
I really appreciate the help!
Thanks,Forum: Fixing WordPress
In reply to: How to remove/hide ads per user basisWorked like a charm!
This is what I did:
<?php if (current_user_can( 'activate_plugins' )) { ?> //no ads <?php } else { ?> //ad block shows <?php } ?>Thank you so much!
Forum: Fixing WordPress
In reply to: How to remove/hide ads per user basisThanks,
I am giving it a try!
Forum: Fixing WordPress
In reply to: Remove the first line of content from postsI am 99.9% sure it is. This is what it looks like:
<p><a href="link-here"><img class="class" title="Title" src="link-here" alt="alt" width="684" height="250" /></a></p>[Moderator Note: Please post code or markup snippets between backticks or use the code button.]
I think it will be more accurate to say that I need to scan for the first image that it is in post and just get it out of there.
Thanks,