Datasets:
id stringlengths 1 6 | title stringlengths 15 150 | text stringlengths 37 32.3k |
|---|---|---|
1 | How do I turn off self-closing tags for markup in WordPress (for HTML5, or HTML4, for example)? | I want to use HTML5 in my WordPress theme, how do I turn off wptexturize? I don't mind WP adding breaks, but I want them to be `<br>` and not `<br />`. How do I get control over how those breaks show up in my code? **EDIT:** I only really care about the `<br>` tag issue, I don't mind the typographic changes it makes. *... |
10000 | What's a good way to unenqueue all scripts for a single template page? | I've found that my attachment templates are inheriting the enqueued scripts for single posts. My first instinct was to unenqueue these scripts one-by-one or to do an `is_attachment()` check before enqueueing them at all. It strikes me that a more robust way to do this might be to simply be to remove any and all enqueue... |
100000 | How do you return a menu with the menu name? | in functions.php, I've defined the following: register_nav_menu( 'home_blocks', __( 'Home Page Posts', 'my_Theme' ) ); In `/wp-admin/nav-menus.php`, I've added a menu called Home Page Posts and assigned 3 posts to it and set it to be the item associated with Home Page Posts as the menu location. In `... |
100004 | Can't seem to get [shortcode]s to work | function register_shortcodes(){ add_shortcode( 'my_shortcode', 'my_shortcode' ); } add_action( 'init', 'register_shortcodes'); function my_shortcode( $atts ) { return "--my_shortcode--"; } Adding this code to a plugin I've been making (specifically for this) doesn't do anyt... |
100005 | Including a custom post type in the Archives widget | I have a custom post type called "videos" that I want to include in the Archives widget (stock widget in the TwentyTwelve theme). It DOES already appear on the archives page, but just not in the widget. I already have add_action( 'pre_get_posts', 'add_my_post_types_to_query' ); function add_my_post_ty... |
100006 | query posts in wordpress | I want to filter my query results just before the_loop starts in word press. I only want the results having term_id or term_taxonomy_id equal to 1. query_posts('post_type=my_post&term_id=1&posts_per_page=6'); This is returning all rows, I am new to word press so I am not sure that we can use term_id ... |
100008 | Up/Down voting system for Wordpress | Looking in all posts with keywords "voting system, upvote, downvote", I can't find a satisfying solution for this issue, except accepting one of the available plugins, spend a lot of time undersanding it and try to modify its functionnalies so that they fit with the requirements. So, I am convinced in writing my own co... |
100012 | How to add a page to the Yoast breadcrumbs | I am using Yoasts Wordpress SEO and I have set up my breadcrumbs. The problem is that my page setup is s follows. / /about /blog - On this page I query the posts and display them. The posts themselves have nothing before them in the URL. The breadcrumb shows as follows. Home / C... |
100015 | Preexisting login to change to logout link in sub menu | I am using twenty twelve with a child theme. I have a link in my primary nav menu where I have an link for “My Account” which has a sub menu with a “Login/Register” link that redirects to a modified wp-login.php. Is it possible for me to turn the “Login/Register” link into a “Logout” link when a user is logged in? If i... |
100021 | How can I change the publish date based on a custom field? | How can I change the publish date based on a custom field? Author uses a date picker to choose the date for journal entry. The date is used to make a list of all the users journal entries. I can order these posts in a list with a `query` and `orderby`. But, then Next and Previous don't match the list. I have read here,... |
100022 | filtering custom post types via meta data drop down | I'm trying to add drop down filters (that are populated by terms that are in use) to a custom search page for "opportunities" or listings page. Currently I am doing this with taxonomies but doing this with meta data, meta_key, meta_query is new to me. I've searched around and most questions are not really dealing with ... |
100023 | Settings API with arrays example | I'm using the Wrox WordPress plugin development book as a primary reference for getting started with a new plugin and I understand all settings can be saved as 1 array but the book does't give an example of this and all the stuff I'm finding on the web seems so different from one example to another. The second half of ... |
100024 | Post content stays the same but permalink changes ? | This is really weird. I made a posttype ' mediagallery ' via the plugin Types fields. I simply want to load the post content and switch the posts with a next & prev button in de sidebar. The post content loads correct. But when i go to the next or prev post, the content stays the same. But only the permalink does chang... |
100028 | how to add custom word press regisration form in word press 3.5 with out module | i want to add custom registration form in wordpress 3.5 ..with out module i tried few code samples in net seems to be not working with 3.5 properly |
100034 | wp user role,username and email id is missing on wp admin panel | i am facing a totally strange problem on my wordpress blog. recently i have migrate my wp blog to a new server. but on the new server everything is working fine. but my author are not able to login. then i checked the admin panel all user. there i can see lots of user/author role, username and email id is missing. I ha... |
100035 | Hourly Routine Not Firing ( wp_schedule_event() ) | _This is a practically copy/pasted version_ of the hourly wp_schedule_event example taken from the .org site. Its not moving...and I know I have visitors to "trigger" it. Its kind of a pain to wait an hour to see if it goes or not. Can someone tell me where I'm going wrong? The only thing I can think is that I'm runnin... |
10004 | How to give a website (Wordpress) a custom title and description in Google search | it's about the website www.kindheitsorte.de. When you do a Google search for "kindheitsorte.de" you get to see "kindheitsorte.de/" as the result - no custom site title or description at all. When you do a Google search for "kindheitsorte" you get "Informationen" as the site title (which is pretty weird because this tit... |
100040 | Can I force get_option to go back to the DB instead of cache? | Is there any way to guarantee that when I call get_option I will definitely get the value from the database and not from cache? |
100042 | How to display a sticky post inside a div? | I have a and inside it I would like to add the contents of the first sticky post. I went on codex.wordpress.org to find more about wp_query and saw this code that I could use to solve my problem: $sticky = get_option( 'sticky_posts' ); $args = array( 'posts_per_page' => 1, 'post__in' ... |
100043 | Sending form data via PHPMailer - How to action PHP script from a form | Some easy points on offer... I wish to action a PHP script from a WordPress page but where is the best place to store the script? The script works perfectly fine using a non- WordPress environment in a flat HTML directory structure. and I want to action it from the page using the following code: <form cla... |
100044 | Displaying content to search engines but via navigation only for registered users. | Displaying certain information depending on if a user is registered is quite easy as I have been using this code <?php if (current_user_can(‘subscriber’)) { ?> [content here] <?php } ?> However, is there any way that this content is visible if somebody directly comes to the link via a sear... |
100045 | Dynamic Image Replacement through call rail phone call tracking plugins in wordpress | I want to dynamically swap an image that contains a phone number. I followed steps given in http://www.callrail.com/docs/web- integration/dynamic-number-insertion/images/ but images not swapped. I installed plugin _CallRail Phone Call Tracking_ and set the api key through call rail account and paste the javascript code... |
100046 | Pagination and multiple loops | Right, so what I currently have is a page split into three using a css grid. The third column is the sidebar, The first two each have a query for posts to display, and create a nice grid of posts (dummy content): http://puu.sh/2Xh9o.jpg Each loop looks like this: <?php query_posts('showposts=5'); ?> ... |
100047 | Check to check if wp_mail is working properly? | I'm trying to use `wp_mail` (testing on local machine) but no mail is received. The `php.ini` has `smtp_port = 25` set and the php `mail()` is working so far. * how can I check if wp_mail is working * what can fail Here is the code of my mail function: function mv_optin_mail($id, $data){ ... |
100053 | Get content or excerpt of top rated votes @GD-Star Rating? | I am using the GD-star Rating plugin and I have a function which outputs the top rated posts. The problem: it won't show the content or the excerpt of those posts. How can I do this? This is the function I am using: <?php global $wpdb; // include the $wpdb $query= "SELECT p.ID, p.post_title as tit... |
100055 | How to handle shortcodes through plugin | I learned that I can only put in the code for handling my shortcode through the theme's `functions.php` But I was thinking of making it a plugin rather than a theme. How can I achieve that? |
100057 | How to trigger $_GET request within admin plugin page? | I have this form in my plugin function: <form method="get" action="" enctype="multipart/form-data"> <p class="submit"> <input type="hidden" name="do_it_hidden" value="run"> <input name="do_it" type="submit" class="button-primary" value="DO IT!"> </p> </form> And this ... |
100061 | Best place to call xdebug helper functions? | Right now I place the following code wherever I expect something to go wrong. /** xdebug helper */ error_reporting(E_ERROR); ini_set("display_errors", 1); ini_set("html_errors", 1); Where should I include this code so that it's always called on every page? |
100062 | Setting limit to posts or page creation | This is regardging to On multisite installation and setting limit to content creation by sub-site admins. I want to set a limit for posts,pages or any custom post types for any sub- site admins. So that they could just create certain number of pages and not more than that. I don't know what filter could help to set lim... |
100068 | Override Taxonomy Template | I'm trying to list all the products tied to a specific taxonomy. For some reason the template won't work when trying to access "http://www.myexample.com/product_categories/funiture/", I tried `taxonomy.php`, `taxonomy-term.php` and nothing. Here's my code: http://pastie.org/7934453 add_action('init', 'reg... |
100074 | get_attachment_link() adds a hashtag to URL | I'm using the get_attachment_link() function in a site I'm developing and it's returning a really weird result. For some reason it adds #main at the end of every url. http://domain.com/post_title/attachment_title/#main Am I the only one getting this strange result? Any ideas? |
100077 | Redirect url in plugin to somewhere else? | I am using **WP-SNAP Extended! v1.0.0** and I want to use this alphabetical menu as a sub-menu beneath my header. I managed to get the alphabetical menu in place, but now, if I click on a letter, it will show the posts on the page I am looking at and that is not good, because it overlaps the things that are already the... |
100080 | Wordpress overwrites UNC | I am using wordpress multisite. When editing a post, adding a link to a file in UNC format, and clicking save, wordpress is stripping out the drive letter and colon before the data hits the database. 'N:/file.pdf' is being saved as '/file.pdf'. This is only true for users who are not network super admins. Does anyone k... |
100082 | Shows site under construction but comes up after I login to admin | I have a strange issue happening with a new site. It keeps going down and shows under construction, but after I login to WP admin, the site comes back up! Any suggestions as to what might be going on here? Thanks! |
100083 | Best practice to limit results in get_row()? | This is my query to check if a title exists (it's in a loop, therefore [$i]). $wpdb->get_row("SELECT * FROM wp_posts WHERE post_title = '" . $titles_arr[$i] . "'", 'ARRAY_A'); Anyway, I would like to know how to use `LIMIT 0,1000` to **query only the last 1000 added posts** to the database when using... |
100084 | WXR xml files are being imported as a TXT files and showing up under 'Media' | I need to import a whole bunch of non-WordPress posts in to Wordpress. I would hope it would be pretty straight forward as there are no pictures or anything; it's basically just a bunch of text. I'm testing out the WordPress Importer plugin but I'm not having much luck, even just using dummy data. To remove all the var... |
100091 | Add Image Size for Featured Image with Responsive Design | So, I know that I can make a custom featured-image size by adding this to my functions.php file: add_image_size('newsize', 883, 300, true); and calling it with: the_post_thumbnail('newsize'); But, I also have CSS rules to make images responsive by including: img { dis... |
100095 | Building a simple "settings" plugin to change textstrings on the home page | I am trying to build a little settings area to change the strings of some text (image urls & links) on the homepage via the dashboard. I have found a useful tutorial which provides the plugin structure (http://wakeusup.com/2011/11/how-to-create-plugin-options-page-in-wordpress/) , but when I try and change the 'key' (n... |
100096 | Borrowing of Previously Translated Strings by Child Plugin | Gist: When writing an extension of a plugin, can the extension "borrow" the translations of the req'd parent plugin by using it's textdomain? Scenario: Let's say that there's a parent plugin, whose translation is up to date, and follows WP standards on the matter. I come along, and write an extension plugin. This exten... |
100099 | How to implement time filter to show random post 1 month for one category and 3 months for other categories | I started to work on one website after another developer and there is problem with his "popular widget" which is basically showing 3 random posts from category. There is some Switch statement which is regulating to show from category news 3 random post not older then 1 month and for other categories 3 month. I don't un... |
100100 | Nested shortcodes | I'm using 2 plugins in my wordpress blog - WP-Members and Dropbox Folder Share. I want to do something like this: [dropbox-foldershare-hyno link="[wp-members field="some_link"]" ver_como='lista'] Is this possible? |
100103 | Where does the time get pulled from in the_time() | I am currently using the following function in my footer <?php the_time( 'Y' ); ?> But the footer keeps showing 2011, instead of 2013. So where does this time stamp get called from exactly? |
100104 | Better handling of WP-CRON server load abuse | There are multiple reports on how wp-cron is a far from ideal solution because it runs every time a page is loaded, which is unnecessary in most scenarios (one scenario in which it would be necessary is when you use _scheduled posts_ ) The common advice is to add `define('DISABLE_WP_CRON', true);` to wp- config.php the... |
100111 | changing the labels inside appearance -> menus for some for the fields | So I've create a custom walker for nav menu (i am talking about the menus located at: appearance -> menu -> add a new menu. I now use the following for several things i need: `URL` `Title Attribute` `CSS Classes (optional)` `Description` My question is how do i change the labels of those fields to be more explanatory t... |
100114 | WP Logs me out after updating anything on dashboard | Not sure what is going on here but my live site kicks the admin out every time they change something in the dasboard. For instance when an admin updates a page the url looks like `http://mysite.com//wp- login.php?redirect_to=http%3A%2F%mysite.com%2Fwp- admin%2Fpost.php%3Fpost%3D9%26action%3Dedit%26message%3D1&reauth=1`... |
100117 | Public (Non-Admin) Post Edit/Revision History | Does anyone know of a way to provide an edit history for posts in production? That is, when people look at a post, they can see that it was modified and examine a list of changes like is possible with other sites (below). I tried looking for a way but everything I found referred to revision histories in the dashboard, ... |
100118 | How Do I include/Import a Custom Widget from the Parent theme into My Child Theme? | I'm trying to make a small modification to a custom widget that was included with a clients parent theme. Whenever I remove the parents version of the widget (for testing purposes) the child version of the widget does not take over. Instead, the widget simply disappears. I've mimicked the directory structure of the par... |
100120 | wordpress url with format .com/category/sub-category | I may be overlooking a simple answer here, but this one is stumping me. I am converting a site to wordpress. The current site has many pages whose URL has the format www.x.com/category/topic. What I cant figure out/remember, is how to create a page or post with that format. As far as I know, the standard wordpress form... |
100122 | Wrap wp_nav_menu output around option tags for select menu | I have set up a wp_nav_menu in Wordpress. I have 2 parent categories, with 2 sub-categories each, so this produces a nested list. My current code to call this menu is... <?php wp_nav_menu( array( 'theme_location' => 'shop-categories', 'container' =... |
100123 | WordPress Multi Site strange redirect on MAIN site | I am using a plugin which allows for multiple TLD's with WordPress multi-site. (WordPress MU Domain Mapping) No idea if this is a conflicting issue or not. Doubtfut, but thought I would throw it out there. Every now and then, when I visit the primary website which multi-site was installed on, I get redirected to a page... |
100124 | Wordpress functions give fatal error in included php file | First, my problem is similar to this thread. However, the solution posted there doesn't work for me. I'm creating a plugin that displays a contact form on a page using the Shortcode API. Plugin folder contents: * contact.php (main plugin file) * validate.php (included php file) The main file has the usual plugin he... |
100126 | Custom built theme won't filter categories | I'm currently finishing up my first proper wordpress theme for my uni assignment. When I select a category in the sidebar the full list of posts from all categories are still shown. I've tried searching online but can't seem to find how to fix this. The site I'm currently building is http://bluepenguindesigns.co.uk/. H... |
100129 | Covert Wordpress Blogname into JQuery | Here is the blogname in php `<?php $blog_title = get_bloginfo('name'); ?>` I want to convert it to javascript. The file I want the blog name is in a .js file so I cant create the variable with php. |
100131 | Allow users of my plugin to define their own shortcode rather than use mine? | I'm creating my first plugin. So far everything is great, but my shortcode is something like this `[BIMS]` and that acronym might not be easy to remember, or appeal to everyone. I'd like to include an option to have them input their own replacement shortcode. What is the proper code to allow them to use their own short... |
100133 | Accessing two databases | I have two databases on my server, and wanted to know is there a way to access both databases from wordpress? My thought is adding the second set of credentials to the `wp-config.php`. |
100139 | Problem with Custom Post Type Categories | Before I proceed on writing anything just have a look the following images. (snapshots)    I have one custom post type ... |
10014 | Why could my comment_form variable not be working? | I'm working on a custom theme that is based off of _Starkers html5 3.0_ and use that theme's comment system. I have followed custom_form tutorials by Otto, Soapbox Dave, forlogos, and Deluxe Blog Tips. All of my code seems to be functioning properly except that I cannot get any of the fields outside of comment_form_def... |
100141 | How to delete posts which have same title? | Some of my posts duplicate title. How to delete them ? And keep only one. Example: I have 4 post which have same title. And I want to delete 3 posts and keep one post. How to do this ? Thank you very much ! Sorry for my poor English ! |
100142 | What makes a placeholder resizable in Tinymce? | It's not that hard to make a plugin to TinyMCE, similar to what the Wordpress gallery is doing in WP 3.5. Unfortunately, these custom placeholders are always non-resizable, although they show the resizer handles. A new image inserted into a post is resizable with the handles, an embedded iframe is resizable, but a new ... |
100146 | Readonly input text appears unlocked while the page is loading | I need help with a code for locking editing an input of type text in the profile page of Wordpress. I added the following code: (function(){ $("#email").attr("readonly","readonly"); }); But while the page is loading, the field appears unlocked, and if the user press 'Esc', the page loadin... |
100148 | Can't set custom taxonomy terms via custom form | ## Question I am creating my first plugin and in it users will be able (among other things) to create new post via custom form from wordpress backend. This post uses custom post type and custom taxonomy. Form creates new post but it fails to set custom taxomony. Creating post regularly (not via my custom form) works fi... |
100149 | Why can't the WP-CLI installer find my php.ini? | I am trying to install WP-CLI on my Mac using the standard installation command (found here: http://wp-cli.org), yet I am receiving the following error message: > `#!/usr/bin/env php` > > Some settings on your machine make Composer unable to work properly. Make > sure that you fix the issues listed below and run this s... |
10015 | wp_list_categories : how do I sort by ID when IDs are not sequential | Trying to display a category by an odd sequence and have the following: <?php wp_list_categories('orderby=id&include=4,5,6,7,8,9,10,72,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41'); ?> notice after ID #10 it jumps to ID #72. How can I code this better?... |
100150 | WordPress keeps resizing my 947x947 image down to 500x500 (full-size option) | This is driving me crazy. The code for the image is: `<img src="MYLINK" />` Yet it keeps resizing my image down to 500x500 from 947x947. How do I fix this? Also, it disregards the image map I have which lets you click on different parts of the image to go to different sites. EDIT: This is what I'm referring to: http://... |
100158 | Pagination is not working on custom query | I have `custom query` with different conditions so that's why my `pagination` is not working with it. When i click on next button it show me the same posts. The `query` i am using are <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;?> if($selectedoption){ ... |
10016 | template_redirect for single posts w/ custom fields | Is there any way I can use `is_single()` inside of my plugin's functions.php file? Currently, this is what my code looks like: if(is_single()) : function my_template() { include(PLUGINDIR . '/supersqueeze/all.php'); exit; } add_action('template_redirect', 'm... |
100160 | Fatal error: Cannot redeclare comment_theme() | I have this wordpress site build up. In the blog section my post is getting repeated which I do not want how can I get rid of this situation Use this link: http://rymahrice.com/some-energy-drinks-contain-too-much- caffeine-for-kids/ scroll down and you will notice the error and the whole post being repeated. Below is t... |
100165 | How can i make like this structure? | Sorry, i'm newbie user Wordpress. Want a accordion list like this: News News 1 News 2 News 3 And when click a accordion item, get image/video slider. How can i make like this? Thank you Sample img:  |
100169 | Filter posts by multiple checkbox categories | I would like to set up a widget to filter my post by categories. Let's say, I do have two different categories, "Countries" and "length of stay" with sub categories. Here is an example of what I have: * Countries * China * Laos * Vietnam * Length of stay * 2-4 Days * 5-7 Days * 8-10 Days Wha... |
100174 | List of buyers for each product | I would like to know if it's possible to get the complete name of each buyers for a specific product or the orders list of a specific product ? |
100175 | Wordpress comments - delimiter "/" not found | Im using wordpress comments as a "chat". Not real time chat its more like comments with more flow. But when 4-5 or more members using coments at the same time i get this message:  Not sure why this happens or if its because more than one user is using ... |
100181 | Upload files in wordpress | What is the best way to upload files in wordpress? How can I upload multiple files at a time like media uploads in wordpress? |
100187 | How to replace featured image upload option with the post media image option | I am looking for a way to insert custom URL links in featured Image as well. Currently Featured image tab is only having these basic settings -  But I want to add custom URL links to my featured image as well, I checked the add media button is having this feature as shown ... |
100189 | Query posts by Author and/or by Tag | I'm pretty sure I need to do some sort of custom query, but not sure about the best way to go with it. I have an author page. It needs to display that author's posts. That's fine, I can do that. I need to amend the query so that it displays the author's posts as well as posts tagged to that author's name. So I imagined... |
100191 | Want to modify a Plugin - Tweetily - Can I make it tweet a Custom Field instead of Post Title? | http://wordpress.org/extend/plugins/tweetily-tweet-wordpress-posts- automatically/ I was wondering if somehow it's possible to make it tweet a Custom Field instead of Post Title? in top-core.php, at line 214 if ($tweet_type == "title" || $tweet_type == "titlenbody") { $title = stripslashes($po... |
100193 | Wp-ecommerce plugin not working with Mobile detecter plugin? | I create new theme for mobile website. and also desktop website. I use Mobile Detecter Plugin for switching theme. But some issue occur when i switch desktop to mobile website and again switch to mobile to desktop that time my store page is call mobile template. Can anybody suggest me for switching theme which is bette... |
100197 | Doesn´t get right information from wp_Query in wordpress using Easy Content Types | Have problems to sort out right information using WP_Query together with Easy Content Types. My query looks like this <?php $query = new WP_Query( array( 'post_type' => 'buildarea', 'territory' => 'centrum' )); while ($query->have_posts()) : $query->the_post(); echo the_content()... |
1002 | Restrict the number of images to upload per post | Is there an easy way to limit to one (per post) the number of images to upload through media upload? |
100204 | How to customize my category pages | I'm an experienced php programmer, but a wordpress newbie. My site uses the theme twenty eleven. I have created some post categories, and some posts for each category. On my site, for each post category, a page has automatically been created displaying the posts for that category. So far so good. What I would like to d... |
10021 | How do I force Wordpress to show most recent version of images in the media library? | My workflow is sometimes the following: 1. Delete many images from the media library at once (named for example, `01.jpg`, `02.jpg`, `03.jpg`...). 2. Re-upload a series of images with the same file names (`01.jpg`, `02.jpg`, `03.jpg`...). The media library retains and display shows the old images as thumbnails and ... |
100210 | forward domain name to particular page? | I;ve got a doman alias setup for one of my Wordpress sites and i'm trying to forward that particular domain to a page. The 2 domains are - www.alias.com www.actual.com When people use the _www.alias.com_ domain i want them to be forwarded to _www.alias.com/content/_ I've tried several things with the htaccess file but ... |
100211 | Multiple loop with pagination in same page | In my home page i have two `<section>` in which i perform two different loops on different post categories. Here the code: <section> <ul class="loop-article"> <?php $pagedArticles = ( get_query_var('page') ? get_query_var('page') : 1 ); $... |
100212 | Hide pages depending on role | I've been trying to find a way to limit the user from seeing some pages in the "pages" menu in the admin panel. I looked in the edit.php file and noticed: } elseif ( 'page' == $post_type ) { However, i am unsure of what i need to edit in order to show **some** pages and hide others depending on the r... |
100215 | Replacing WordPress Icons (menu,icons32, etc)? | I want to replace wordpress admin sprites. I recreated the images and looked answrs for icon replacement using jquery and simply with CSS BUT what about ones link icons32-2x.png where I can't find the CSS? So I am trying to figure out a simple way to redirect the wordpress admin and includes folder to use my new icons ... |
100216 | Eliminate duplicates in a foreach loop | I've created a filter for my search results that allows people to filter user searches based on their `State` from their profile. The problem I am having is that there are duplicate states showing in the drop-down list for users that have the same state. Here is the current code trying to eliminate that problem. ... |
100218 | Display custom field if it exists and has a specific value | I am trying to display the post title if the custom field exists and has a value of apple... <?php if ( isset ( get_post_meta($post->ID, 'mycustomvalue', true ) ) ) && if ( get_post_meta($post->ID, 'mycustomvalue', true ) == 'apple' ) : ?> <?php the_title(); ?> I am getting a white screen, a... |
10022 | Is it possible to query_posts using post__in and then Loop through them in the ordered they were queried? | query_posts( array ( 'post__in' => array( 5, 76, 21, 56, 3 ) ) ); I'd like to query the Loop using `post__in` and a set Wordpress IDs. I'd then like to run through the Loop in the exact order of the query. Does anyone know if that is possible? |
100220 | Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page | I am working with custom post types and I had trouble with the nav menu not getting the `.current-menu-item` on my `custom post archive page` menu item. In fact, when I was on that page or any of the `custom posts`, instead of the cpt archive menu item getting the current class, the menu item pointing to the articles w... |
100221 | Multiple pages on one with different HTML | I am a bit confused on how this may be achieved. I have a website that I have coded already with static HTML/CSS and I am trying to incorporate it into wordpress. The challenge though is that the website is single page index.html file with 4 "sections". I want each section to be a page that can be accessed by anyone to... |
100225 | Options page for widget | I started developing a plugin which only required a few options. But over time the number of settings grew, and I want to move most of them to a separate page. I've seen quite a few tutorials about options pages and about widgets, but I couldn't find one that explained how to create an options page for a particular wid... |
100234 | wp-cli displays php notices when display errors off | I am using wp-cli and I am having php notices and errors show up when running wp-export. Some of these warnings and errors are ending up in the output file. How can I force errors to NOT show up. I have tried `ini_set('display_errors', 0);` and `error_reporting(0);` in wp-wp-config.php root@roc-apache-4:/... |
100235 | Too Many Redirects - WP-Admin Only | I have a couple of sites on a shared hosting server. The sites load just fine, and everything appears to work, including local links. The only thing that isn't working is that the entire wp-admin directory is throwing a "too many redirects" error message. Here is what my redirects look like to handle the domain (this i... |
100240 | Total number of authors with more than one post | <?php $users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users"); echo '(', count( get_users( array( 'role' => 'author' ) ) ); echo ')' ?> code by Jan Beck I need to know what is my best option for displaying the total number of authors who have at least posted and/or published something on my blo... |
100243 | Woocommerce Cart Going toAdmin Login Page | When I try and add/remove something from the cart, it sends me to the admin login page. However, when I go back to the shop page, it shows that the item has been added to the cart. I can't get past this to see my cart and continue to buy the product(s). What can I do to fix this problem? |
100248 | Removing blog page images | I have my blog page here on a website I created, however I'm not understanding quite where to find the code to get rid of the images on my child theme. I'm using code from Twenty Ten and have set my own BLOG template page up but it's not working so I'm obviously editing the wrong file. So isn't loop.php the file I'd wa... |
100253 | Deleting users do not deletes coments | Hello I have bee trying to figure this one out without any luck. I am deleting users from my site, and selecting either `delete comments` or `attribute comments to:` options do nothing. The user does not show in dashboard->users but all their comments are there and/or not attributed to someone i chose. Any ideas why th... |
100254 | Custom taxonomy position in admin panel | I can't figure out how to change position of custom taxonomy menu item in the admin panel. Right now I have custom post type-- `custom_1`-- and another custom post type-- `custom_2`. For custom_2, I've set `'show_in_menu' => 'edit.php?post_type=custom_1'` and it works fine. The problem is, I've added a custom taxonomy ... |
100255 | Make WordPress size and name images for Retina.js | I'm a huge fan of the way retina.js works for high pixel density displays. Essentially, when it's loading image assets (via `<img>` or css image) it will check if there's a `@2x` suffix version of the image (eg. if there's a `logo.jpg` it will automatically show the `logo@2x.jpg` in its place if it exists. The WordPres... |
100256 | Jetpack infinite scroll not working on Twenty Twelve | I just updated **Jetpack** and the theme, and the **infinite scroll** doesn't work anymore. I have tracked the console, and the **XHR** does receive the content of the posts to add but somehow it isn't displaying them. My blog is: http://jorjon.com/blog/ I have **no custom modification** whatsoever. **Update:** Thanks ... |
100257 | Retrieve image from content, assign it as a featured, and then remove it from the content | I am trying to grab the first image from the content and use as featured image, then remove the that image from the content. I found the plugin get the image, but it doesn't save image on the post, at least on 3.5.1 wp |
CQADupstackWordpressRetrieval — BEIR, unified schema
A normalised copy of the dataset behind the mteb task CQADupstackWordpressRetrieval, one of the tasks of the BEIR benchmark as mteb defines it (a member of the aggregate task CQADupstackRetrieval). Same queries, documents
and relevance judgements as the benchmark evaluates — reshaped into one strict schema shared by every dataset
in this collection.
| Source | mteb/cqadupstack-wordpress @ 4ffe81d471b1 (the revision pinned in mteb) |
| Domain · languages | stackexchange · eng |
| Queries / documents / qrels | 541 / 48,605 / 744 |
| Qrels per query | min 1 · mean 1.375 · max 62 |
| Score values | 1 ×744 |
| Layout | queries · corpus · qrels, split test |
| License | cc-by-sa-4.0 |
Schema
| config | columns | rules |
|---|---|---|
queries |
id: string, text: string |
ids unique and non-empty; every query has ≥ 1 qrel |
corpus |
id: string, title: string, text: string |
title is always present ("" when the source has none) |
qrels |
query-id: string, corpus-id: string, score: int32 |
referential integrity to both tables; no duplicate pairs; no floats |
Files are Parquet, sorted by id, zstd-compressed, sharded at 500 MB. Every rule above is enforced by a validator
before publishing; provenance.json records the source file hashes, what changed, and the output file hashes.
What changed from the source
- byte-preserved all text — no whitespace, newline, or control-character normalisation
- cast
qrels.scoredouble -> int32 - kept 1 NUL byte(s) present in the source text — text is byte-preserved
- kept 11 documents whose text is identical to another document's — a property of the source; note that models embed such documents identically and retrieval ties among them are broken by corpus order
- renamed
_id→id - renamed source splits (
queries←queries/queries,corpus←corpus/corpus) totest
Load it
from datasets import load_dataset
queries = load_dataset("Hyukkyu/beir-cqadupstack-wordpress", "queries", split="test")
corpus = load_dataset("Hyukkyu/beir-cqadupstack-wordpress", "corpus", split="test")
qrels = load_dataset("Hyukkyu/beir-cqadupstack-wordpress", "qrels", split="test")
License and attribution
The data is redistributed under the source's terms — cc-by-sa-4.0. All credit belongs to the
original authors; see the source repository and the references in mteb's task metadata (http://nlp.cis.unimelb.edu.au/resources/cqadupstack/).
This repository is an independent repackaging and is not affiliated with the RTEB or MTEB maintainers.
License discrepancy. The upstream dataset card declares
cc-by-sa-4.0whilemteb'sTaskMetadatadeclaresapache-2.0. This card carries the upstream value as the more conservative choice.
- Downloads last month
- 25