How is WordPress child related to Buddypress child theme

Your question is not very clear, but you should for the most part think of themes as being very much distinct. There is only one relationship between themes– that between a parent theme and a child theme. Themes in general are not related. Child themes in general are not related. Themes do not share code … Read more

How do I find the first item in the post array?

You can get first item using this code <?php global $post; $the_post_ID = $post->ID; $n = get_posts(); $i=1; ?> <?php foreach ( $n as $post ) : ?> <nav id=”postNav”> <ul> <li<?php if ($i){ echo ‘ class=”current”‘; $i=0; }?>> <a href=”https://wordpress.stackexchange.com/questions/88596/<?php the_permalink(); ?>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten`enter code here`’ ), the_title_attribute( ‘echo=0’ … Read more

illegal offset in option add

The array is ‘hidden’ inside the form elements. Their respective name/ID is like MY_option_name[some_other_name]. That is the array structure. // Edit (to elaborate a little on that) Suppose you have the following form: <form action=”options.php” method=”post”> Font:<br /> <input type=”text” name=”MY_options[font]” id=”MY_options[font]” /> Color:<br /> <input type=”text” name=”MY_options[color]” id=”MY_options[color]” /> <?php submit_button(); ?> </form> If … Read more

Facebook redirect buton

If you got everything else running and it is really just the redirect that you can’t manage, then replace the ‘alert’ lines in Ottos example with window.location = “http://www.your-domain.tld/”.

Custom Fields, Media uploader, Attachments

There are a few different ways to get your values. One way is in the loop and another way is outside the loop. Here is a short code snippet that can be used to get them outside the loop ( untested ) <?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, ‘customField’, true); ?> You will … Read more

Theme Options – localhost to new url

The way I’ve always migrated sites is not by search and replacing, but just by changing two fields in wp_options: siteurl and home. Try doing only this, no search and replace, and see if it fixes your options page / widgets. It may be that by replacing all instances of “localhost,” you’re actually impairing your … Read more

WordPress Redirecting Form Action to Home Page

You have to set the path in the action attribute of your form, e.g. <form action=”/my/form/page” method=”post”> … </form> If action is missing or empty it will send the form to the current page, if it is just “https://wordpress.stackexchange.com/” it will send it to the home page.

WordPress Rewrite Url with arugments

Instead of using $_SESSION variables we’ll register a query variable. function wpa_91718_query_var( $vars ) { $vars[] = ‘event_page’; return $vars; } add_filter( ‘query_vars’, ‘wpa_91718_query_var’ ); Then we can modify the query before it is run using pre_get_posts. If I understood you and your code correctly, then if the query var is present in the URL, … Read more