Sorting Meta Fields?
Sorting Meta Fields?
Sorting Meta Fields?
As far as I know, having a subfolder in your URL for your blog does not cause decreasing in your Google rankings. And, having /blog/ in your URL is totally logical for you and your users, and SEO is all about logic, semantic and other stuff.
Shortcodes are processed on display so the code must be available on the front end when the shortcode is processed. Superficially, that means frontend.php. I have never tried to split shortcode code in this way. You may have trouble splitting it off from the backend. The add_shortcode function is in wp-includes/shortcodes.php which loads for both … Read more
Make sure all your files are encoded in UTF-8. Keep your theme language agnostic: Write all strings in English and use the proper translation functions to get the translated string (eg. Arabic): _e( ‘Hello world!’, ‘your_text_domain’ );
Setting the third parameter of get_post_meta to true does not guarantee that you get a string. What that parameter does is control how many rows of the database get returned. When true you only get a single result and not an array of all of the rows in the database that match. You will get … Read more
You shouldn’t edit that file. You should over-ride it. Create a folder called ‘buddypress’ in the root of your theme folder. Place a copy of post-form.php in that folder – using the same dir structure as bp-templates/bp-legacy/buddypress/ Then you can update buddypress without losing your changes.
Some of my php is rendered only when logged as admin
Your query arguments, formatted to be readable, look like this: $args = array( ‘taxonomy’ => $taxonomy, ‘term’ => $term->slug, ‘posts_per_page’ => 1, ‘orderby’ => ‘modified’, ‘category’ => $str ); That does not match any argument pattern I see for WP_Query. I think you are trying to construct a tax_query but that should look like this: … Read more
Each set of form fields has the same set of field names ([…] is the rest of your code): <?php foreach ( $myrows as $a ): ?> <input id=”id” type=”text” name=”id” value=”<?php echo $a->id; ?>”> […] <?php endforeach ?> If 3 rows are returned in $myrows and the values are fee, fie, foe, the value … Read more
Use PHP’s substr() function: $outcome = trim( get_user_meta( $user->ID, ‘first_name’, true ) . ‘ ‘ . substr( get_user_meta( $user->ID, ‘last_name’, true ), 0, 1 ) . ‘.’ );