Big Bagel
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to get "key" from "value" in custom metaTo get an array of all the keys and values in a specific post you could use: get_post_custom()
<?php $my_custom = get_post_custom(); ?>
However, since you already have to know the key to use:
<?php echo get_post_meta($post->ID, 'moviename', true); ?>
couldn’t you just save the key in a variable for use later?
$my_key = 'moviename'; <?php echo get_post_meta($post->ID, $my_key, true); ?>
Forum: Fixing WordPress
In reply to: HTML5 head and bodyLooking at Arjuna-X’s code, the opening <head> tag is on the 4th line of header.php:
<?php $arjunaOptions = arjuna_get_options(); ?> <!DOCTYPE HTML> <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> <head> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> ...all the subsequent code in the file...
and the closing </body> tag is on the second to last line of footer.php:
...all the previous code in the file... <?php wp_footer(); ?> </body> </html>
Forum: Fixing WordPress
In reply to: HTML5 head and bodyThe <head> tag is usually in your theme’s header.php file and the closing </body> tag is usually in the footer.php file. It can be different in various theme’s though. It’s usually better to create a child theme and do any alterations there.
Forum: Fixing WordPress
In reply to: Need a PER MONTH hostEvery host chooses how they want to bill customers (monthly, annually, etc). You’ll just have to make sure before choosing one; usually they’ll say something like: $12 a month, (paid annually) if they charge once a year. Unless Blue Host has a money back guarantee or are kind enough to let you go, it would seem you won’t have to worry about looking for other hosting providers for at least two years.
A couple specific hosts that I know charge monthly:
Laughing Squid
Media TempleForum: Fixing WordPress
In reply to: how to find uri of my sitehttps://en.wikipedia.org/wiki/Uniform_Resource_Identifier
https://codex.www.ads-software.com/Glossary#Absolute_URIThe uri used to reach your website would be the url: https://my-domain.com.
Edit: Heh. Sorry cubecolour, looks like I ninja posted you. ??
Forum: Fixing WordPress
In reply to: Hide page for logged in UsersSomething like this should work:
if ( is_user_logged_in() && is_page( 10 ) ) { wp_redirect( get_permalink( 5 ) ); exit; }
Edit:
To make sure it redirects before any headers are sent you would probably want to wrap it in a function and use a hook. I’d put it in functions.php.add_action( 'init', 'check_redirect_page' ); function check_redirect_page() { if ( is_user_logged_in() && is_page( 10 ) ) { wp_redirect( get_permalink( 5 ) ); exit; } }
Forum: Fixing WordPress
In reply to: .htaccessWordPress uses .htaccess rules to make permalinks work. MAMP uses apache so you should be able to do what the message says; create an (or alter the existing) .htaccess file in your root folder (where WordPress is installed) and put the rules it gives you in it.
Forum: Fixing WordPress
In reply to: Need to add variable to function<?php $link = get_field( 'links' ); if ( isset( $link ) && $link ) { $args = array( 'title_li' => 0, 'categorize' => 0, 'category_name' => 0, 'category' => $link, 'show_images' => 0, 'show_description' => 1, 'after' => '<br />', 'between' => ' ', 'orderby' => 'url' ); wp_list_bookmarks( $args ); } else { echo '<em>No links have been submitted and approved yet.</em>'; } ?>
If it’s already working for you then there’s no problem, but if anything has a problem with $link being a string you can always do:
$link = intval( get_field( 'links' ) );
Forum: Fixing WordPress
In reply to: Custom Post Type List PageRecently helped someone who had the same problem here. Using “paged” instead of “page” worked:
query_posts( 'post_type=newPostType&paged=' . get_query_var( 'paged' ) );
Forum: Fixing WordPress
In reply to: Previous/Next buttons not workingAh, sorry. Now that I can see it’s using the “paged” parameter in the url, try using “paged” instead of “page”:
query_posts('category_name=Blog&paged=' . get_query_var( 'paged' ) );
My second suggestion would never work as it is (I copy/pasted from the codex without thinking). Sorry for making you try all sorts of things. If this doesn’t work I’ll copy the template above and test it my own installation.
Forum: Everything else WordPress
In reply to: Problem with www.ads-software.com profile/user nameThanks! Hopefully it fixes itself in the rework. I don’t know why I registered with a space in my username; everywhere else I make sure to use BigBagel.
Forum: Fixing WordPress
In reply to: endif issue, its showing up on page, in ie only!Since the IE conditional is just adding a bit of styling, you could add that part into your theme’s header.php file directly; it looks like there’s another IE conditional in that file already. If you want to disable WordPress automatically altering your posts/pages you can use a plugin like this one.
Forum: Fixing WordPress
In reply to: endif issue, its showing up on page, in ie only!Looks like a rouge space got in there:
< ![endif]-->
As I’m sure you know, should be:
<![endif]-->
Forum: Fixing WordPress
In reply to: Need to add variable to functionYeah, it’s probably a conflict (I’d say it’s the Advanced Custom Fields plugin). Are you adding this new custom field through that plugin or the “normal” way? In your original post you mentioned
the_field('links')
, which seems to be one of the way this plugin provides access to custom fields it creates. If you added the custom field through the plugin and it’s set as “text” then you could probably replace:$link = get_post_meta( get_the_ID(), 'links', true );
with
$link = get_field('links');
Forum: Fixing WordPress
In reply to: Removing edit buttonA link to your website might be helpful. Are you saying that the edit button appears even when you have not logged in? The edit button on posts and pages should only show if, in the browser(s) you are currently using, you have logged in.