Noel Tock
  • Member for 11 years
  • Last seen more than 1 year ago
Redesigning Custom Post Type "Add New" page
4 votes

When I was looking into the same matter, I found this article to be quite interesting: How to Create A Custom WordPress Meta Box Instead of Using WordPress Custom Fields Learning how to create custom ...

View answer
jQuery UI in Admin (Best Practice?)
4 votes

Thanks again scribu, here the working result for anyone interested (custom-admin is just my js for the datepicker): function wpse_9080_admin_head() { global $pagenow; // Example of enqueue ...

View answer
What is the best way to get directory path for wp-config.php?
3 votes

I guess it sounds silly, but could you work your way up from the plug-in directory? if ( file_exists('../../../wp-config.php') ) : include_once '../../../wp-config.php'; ; I'm sure someone else ...

View answer
How to add a "policy text" just before the comments?
3 votes

Just add it in before the comment function (unless I misunderstood something?): <div class="policy">policy text</div> <?php comments_template(); ?> This would be on single.php, ...

View answer
Code Friendly Block Quotes
3 votes

WP - SyntaxHighlighter Evolved This is my favorite one, I had issues with others not processing the content correctly (despite being defined as the right language): URL: http://wordpress.org/extend/...

View answer
fetch images and videos
3 votes

ntechi, To answer your question in the comment above ("is it possible i take it from google? for example in google images if i type "Apple" then i get images of apple, but in such a way, that this ...

View answer
Developing mobile version of WordPress site
2 votes

Your question conflicts slightly. I get the feeling you don't necessarily want a mobile site, but a mobile-optimized or responsive website. This would mean however that you wouldn't need another ...

View answer
Problems Displaying Multiple WP Menus
2 votes

You need to define the theme location when displaying with wp_nav_menu, i.e.: <?php wp_nav_menu( array( 'theme_location' => 'left-menu', 'menu' => 'Left Menu' ) ); ?>

View answer
Buddypress Full documentation
2 votes

Here you go: http://byotos.wordpress.com/2010/02/07/how-to-get-a-list-of-buddypress-actions/

View answer
themeforce (happytables framework) implementation
1 votes

Founder here. Most people use the framework to see how we've solved certain challenges, so they'll re-use individual code blocks. It's not plug and play as is noted at the very top of the github ...

View answer
Extract the last published post
1 votes

This is how I do it. You may want to reset and call it as a function in case you want to reuse. // Most Recent function nt_mostrecent( $count ) { $my_query = new WP_Query( array(showposts =&...

View answer
How to translate __('') strings in admin
1 votes

You'll first need to create your .POT file, here are some instructions: http://weblogtoolscollection.com/archives/2007/08/27/localizing-a-wordpress-plugin-using-poedit/

View answer
Combining media queries with image sizes
1 votes

First off, kudos to this pretty cool solution. I think you're on the right track and not sure how much more you could do. You could certainly replicate the above with PHP & CSS, thus not ...

View answer
Jumbled writing under a post
1 votes

Find in your CSS (on line 915 of style.css for the Twenty Ten theme): #nav-below { margin: -18px 0 0 0; } change to: #nav-below { margin: 10px 0; } What's happening is that the #nav-below is ...

View answer
Exclude Random Redirect from caching?
1 votes

Use jQuery or Javascript to cycle through and randomly pick one of your links, this way you can bypass the caching? var messages = ["Good!", "Great!", "Awesome!", "Super!", "Nice!"]; function ...

View answer
Calling Posts from Specified Cat
Accepted answer
1 votes

You're not actually running any queries. Need to run wp_query(), query_posts() or get_posts(). All are covered in great detail within the codex. Though you already have your parameters listed up ;)

View answer
How can I hard code my sidebar?
1 votes

Create another PHP file with all your custom content (let us call it custom_sidebar.php ). Then include (or replace sidebar.php) on pages/templates the following line (where you want the content): &...

View answer
Is it appropriate to remove custom posts and terms on plugin uninstall?
1 votes

I think it's important that you remove custom options by default (or maybe even give the user the chance to export/import them, depending on the depth/scope of your plug-in). The user should ...

View answer
Custom Select Query with Custom Post Types
1 votes

Finally got it, thanks for the help guys... <?php $querystr = " SELECT * FROM $wpdb->posts wposts, $wpdb->postmeta metadate, $wpdb->postmeta metatime ...

View answer
Why is the expected file not being deleted?
Accepted answer
1 votes

For unlinking, try: function superDeactivation() { $myFile = "testFile.txt"; if(is_file("$myFile")) { unlink("$myFile"); } } Or alternatively: function superDeactivation() { $myFile =...

View answer
Display recent comments with gravatar and excerpts?
1 votes

Do you have wp_reset_query(); at the bottom of your single post/page? I'm assuming that the previous query is flowing over into your widget query and that the reset mentioned above is missing from the ...

View answer
Remove Custom Taxonomy Base
1 votes

Rewriting the slug (-> to empty) within the taxonomy registration won't work so I'm not sure what other options you have within WordPress. You'll probably need to modify the .htaccess directly to fit ...

View answer
wp_enqueue_script causes page to vanish
Accepted answer
0 votes

You don't need to enqueue jquery if it's already being referenced in my 'my-script'. Also you're running php within php, so you can change this: "<?php echo get_template_directory_uri() . "/my-...

View answer
Turn on again old expandable menu
Accepted answer
0 votes

Yep, believe so. Try this (enqueue in admin styles): Show sub-menus at all times #adminmenu .wp-submenu, .folded #adminmenu .wp-submenu { display: block !important; } Hide Pop-up Navs .wp-...

View answer
Load custom post type in a different WordPress installation
0 votes

I think another simple solution, would be for you to create a JSON file via PHP of all the content you need (including any additional meta), i.e. <?php // Delcare JSON filetype header( 'Content-...

View answer
Favicon storage - which folder should be used?
0 votes

The Favicon isn't dynamic and doesn't "conflict" with anything else, with that in mind, I hard code it in the header.php and am then done with it.

View answer
Software for WordPress Theme and Plugin Development?
0 votes

W7 / x64: NetBeans for PHP, HTML, CSS (& LESS, though the plug-in does not function perfectly). XAMPP for environment. TortoiseGIT for some projects (with GitHub) TortoiseSVN for other projects (...

View answer
How to include code only on specific pages?
0 votes

Could do something along the lines of (in the header.php): <?php if ( have_posts() && ( is_page() || is_single() ) ) { $content = get_the_content(the_post()); ...

View answer
How to detect if a Shortcode is being called on a page?
0 votes

So here's my trainwreck version of it (as it stands this minute, Anmari has given plenty of good ideas). It's not really flexible at all for anyone else's use either, but our hosted platform and how ...

View answer
How would you feed Custom Post Types to Facebook?
Accepted answer
0 votes

If anyone else is interested, this is how I solved it: I created a custom feed as a page template. As RSS 2.0 doesn't support images for each entry/item, I created an Atom feed instead; all that ...

View answer