select wordpress custom post type

Please check WordPress theme hierarchy and you will know which file you need to create for custom post types 🙂 http://codex.wordpress.org/File:Template_Hierarchy.png Most likely you are after archive-$posttype.php

Accessing Global Vars & Functions in custom php page

Adding the following code to the top of the PHP file will give you access to the WordPress functions and global variables. <?php include_once($_SERVER[‘DOCUMENT_ROOT’].’/wp-load.php’ ); You should then be able to run normal WordPress functions to determine whether or not the user is logged in: <?php global $user_ID; get_currentuserinfo(); if ($user_ID) { // Do Something … Read more

What does $2$3 mean? [closed]

Agree this isn’t really a WordPress question. However, I believe the $1, $2, and $3 refer to the capture groups determined by the (.*?) wildcards. Now, regex is totally voodoo to me so I’m sorry I can’t explain it 100%. However if you look at the $pattern definition: $pattern = ‘/<img(.*?)src=”https://wordpress.stackexchange.com/questions/66610/(.*?).(bmp”gif|jpeg|jpg|png)”(.*?) \/>/i’; Then $1 is … Read more

Using a string from a custom field within a link

Change, <?php $email ?> to… <?php echo $email; ?> as you need to echo the result of what’s held within $email as the function types_render_field would be using return within the function (if you dig into its core) to return the data instead of directly printing it to screen. <?php $email = types_render_field (“email”); if … Read more

Migrating site, only header shows

The PHP Fatal Error will halt any further output, so yes this is the reason that only the header is displayed. Did you install the theme via FTP or did you install using the zip upload? I’d guess that you missed some files when uploading.

Page Options Saving But Not Updating In Backend

If the page is manually refreshed then the right content shows up, it’s so weird! I am pretty sure this is the problem, and its not that weird. If you update with AJAX (in your case with jQuery/Javascript) the generated page– the page in the browser– is not going to reflect any changes unless your … Read more

Cloning add_settings_field() with jQuery

jQuery can only clone what is on the current page or what is loaded over AJAX, so setting something up on the backend and cloning it on the front is not possible. What you can do is create a string and print to the front as a Javascript variable or as a hidden div that … Read more

xmlrpc how to check for errors

Did you check your response ? in most of cases if its workable xmlrpc server it wil return you a faultCode and faultString. You also can setup your oun XMLRPC server (see xmlrpc.php wp_xmlrpc_server_class filter hook) to debug requests on a server side.