Get current WordPress page then add #post ID to the end

Your answer should return: “ so from there you just do this: $final_url = $URI.’#’.get_the_ID(); Which should echo http://mydomain.com/current/page#372 which is kinda good for linking. But if your looking for a “bookmarks” link it would be best practice to do this (inside the loop): echo ‘<a href=”‘.the_permalink().'” title=”‘.the_title().'”>’.the_title.'</a>’; Which will echo “Interesting Page” (note the … Read more

How to create an archive section of a WordPress site

You could use Custom Post Types which will keep users from selecting a custom template. Here are a few links to help you get started: WordPress Codex (register post types) Think Vitamin Custom Post Types Tuturial Plug-ins: Custom Content Types Easy Post Types Custom Post Type UI For More Control you might use Custom Taxonomies … Read more

Modify Global Posts Plugin

Can you use the SQL OFFSET statement: OFFSET 1 $query = “SELECT * FROM ” . $wpdb->base_prefix . “site_posts WHERE blog_public=”1″ AND post_type=”” . $recentglobalpoststype . “” ORDER BY post_published_stamp OFFSET 1 DESC LIMIT ” . $recentglobalpostsnumber;

Disable media upload in rich text editor

You simply set the parameter to false when you create the editor, which you do with a call to the_editor as follows: <?php the_editor($customcontent, $id = ‘CustomContent’, $prev_id = ‘title’, $media_buttons = false, $tab_index = 2); ?> The first parameter is the content that should be used to fill the editor when the page loads, … Read more

exclude posts from a custom category

If you want to exclude posts from a particular category then you could try putting this in your functions.php function exclude_posts_from_category( $query ) { $catname = “Put you category name here”; if ( $query->is_category() && ( $catname == $query->query_vars[‘category_name’] ) ) { $query->query_vars[‘post__not_in ‘] = array( 1, 2, 3 ); } } add_action( ‘pre_get_posts’, ‘exclude_posts_from_category’ … Read more