Slightly modified options framework Colour picker
Slightly modified options framework Colour picker
Slightly modified options framework Colour picker
I think the best way to do this would be to add a filter to when the content is pulled into the post/page: <?php add_filter( ‘the_content’, ‘add_bw_thumbnails’ ) ?> Or to when an image is inserted into the editor: add_filter( ‘post_thumbnail_html’, ‘add_bw_thumbnails’, 10 ); add_filter( ‘image_send_to_editor’, ‘add_bw_thumbnails’, 10 ); You then just have to write … Read more
Solved this with the following code: <?php $blog_id = 1; //set the blog id to the main site id switch_to_blog( $blog_id ); $user_id = get_current_user_id(); $group = Groups_Group::read_by_name( ‘Premium’ ); if ( Groups_User_Group::read( $user_id, $group->group_id ) ) { echo ‘PREMIUM!!’; } else { echo ‘Not premium’; } restore_current_blog(); ?>
I figured this out by reading this article. It was very simple, all I had to do was: Change the $talks_cat_args[rewrite][slug] from ‘talks’ to ‘talks/category’ (which I had tried before) but missed… Make sure register_taxonomy is before register_post_type. Read the article, but it’s basically because of “how WP_Rewrite works as the process of deciphering permalinks … Read more
Use get_post_field(‘post_content’, $product_page->ID ) to get the content outside loop. <?php $product_pages_args = array( ‘meta_key’ => ‘_wp_page_template’, ‘meta_value’ => ‘page_library_html.php’ ); $product_pages = get_pages( $product_pages_args ); ?> <?php foreach ( $product_pages as $product_page ) { echo ‘<div id=”posts” class=”flex_100″>’; echo ‘<div id=”library_title”><a href=”‘ . get_permalink( $product_page->ID ) . ‘”>’ . $product_page->post_title . ‘</a></div>’; echo ‘<div … Read more
<?php $product_pages_args = array( ‘meta_key’ => ‘_wp_page_template’, ‘meta_value’ => ‘page_library_html_content.php’, ‘hierarchical’ => ‘0’ ); $product_pages = get_pages( $product_pages_args ); ?> <?php foreach ( $product_pages as $product_page ) { $author_id = get_post_field(‘post_author’, $product_page->ID ); $author_details = get_user_by( ‘id’, $author_id ); $author_name = $author_details->first_name . ‘ ‘ . $author_details->last_name; echo ‘<div id=”posts” class=”flex_100″>’; echo ‘<div id=”library_title”><a href=”‘ … Read more
No input file specified after enabling multi site
WP Gallery Image Page Issue When 2 galleries share one image
You must register callbacks before they are called (add_action() and add_filter() are registration functions, they remember what to do when). Try the following in your functions.php or in your plugin: add_action( ‘topofthetop’, ‘load_FB_JS_SDK’ ); function load_FB_JS_SDK() { if ( is_singular() && have_comments() ) someclass::FB_JS_SDK(); }
I’ve used WordPress Conditional Tags to add a unique class or id to the containing div of the different page types. This could work well to change the background image/color for different types. Also, WordPress automatically adds a body class to the <body> tag for each page, so that could possibly be hooked into for … Read more