<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>W3 Experts</title>
	<atom:link href="http://w3xperts.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://w3xperts.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 17:12:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to remove entire admin menu?</title>
		<link>http://w3xperts.com/how-to-remove-entire-admin-menu/</link>
		<comments>http://w3xperts.com/how-to-remove-entire-admin-menu/#comments</comments>
		<pubDate>Tue, 15 May 2012 17:12:26 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[admin-menu]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=1180</guid>
		<description><![CDATA[I need to customize the admin panel for my user. So how do I remove the entire admin menu? Not remove the menu item, I mean entirely remove the left vertical menu bar, include the design of the menu (eg, ...]]></description>
			<content:encoded><![CDATA[<blockquote><p>
I need to customize the admin panel for my user. So how do I remove the entire admin menu? Not remove the menu item, I mean entirely remove the left vertical menu bar, include the design of the menu (eg, css, background..etc). I want it become blank.</p>
<p>I can do it by css hack. But I prefer to use hook to do it. Any ideas?
</p></blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>The correct hook to use is admin_menu and then create a function to remove the menus you want to remove. The following 2 functions remove all the menus.</p><pre class="crayon-plain-tag">add_action( 'admin_menu', 'remove_admin_menus' );
add_action( 'admin_menu', 'remove_admin_submenus' );

//Remove top level admin menus
function remove_admin_menus() {
    remove_menu_page( 'edit-comments.php' );
    remove_menu_page( 'link-manager.php' );
    remove_menu_page( 'tools.php' );
    remove_menu_page( 'plugins.php' );
    remove_menu_page( 'users.php' );
    remove_menu_page( 'options-general.php' );
    remove_menu_page( 'upload.php' );
    remove_menu_page( 'edit.php' );
    remove_menu_page( 'edit.php?post_type=page' );
    remove_menu_page( 'themes.php' );
}


//Remove sub level admin menus
function remove_admin_submenus() {
    remove_submenu_page( 'themes.php', 'theme-editor.php' );
    remove_submenu_page( 'themes.php', 'themes.php' );
    remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' );
    remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=category' );
    remove_submenu_page( 'edit.php', 'post-new.php' );
    remove_submenu_page( 'themes.php', 'nav-menus.php' );
    remove_submenu_page( 'themes.php', 'widgets.php' );
    remove_submenu_page( 'themes.php', 'theme-editor.php' );
    remove_submenu_page( 'plugins.php', 'plugin-editor.php' );
    remove_submenu_page( 'plugins.php', 'plugin-install.php' );
    remove_submenu_page( 'users.php', 'users.php' );
    remove_submenu_page( 'users.php', 'user-new.php' );
    remove_submenu_page( 'upload.php', 'media-new.php' );
    remove_submenu_page( 'options-general.php', 'options-writing.php' );
    remove_submenu_page( 'options-general.php', 'options-discussion.php' );
    remove_submenu_page( 'options-general.php', 'options-reading.php' );
    remove_submenu_page( 'options-general.php', 'options-discussion.php' );
    remove_submenu_page( 'options-general.php', 'options-media.php' );
    remove_submenu_page( 'options-general.php', 'options-privacy.php' );
    remove_submenu_page( 'options-general.php', 'options-permalinks.php' );
    remove_submenu_page( 'index.php', 'update-core.php' );
}</pre><p>Screenshot of left menu using the above 2 functions:<br />
<img src="http://i.stack.imgur.com/Chr6f.png" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/how-to-remove-entire-admin-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get from sql query page id and retrieve it url and title</title>
		<link>http://w3xperts.com/how-to-get-from-sql-query-page-id-and-retrieve-it-url-and-title/</link>
		<comments>http://w3xperts.com/how-to-get-from-sql-query-page-id-and-retrieve-it-url-and-title/#comments</comments>
		<pubDate>Tue, 15 May 2012 17:08:33 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[pages]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[wp-query]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=1177</guid>
		<description><![CDATA[onditions: Page have template, for example: /* Template name: News */ Explaining: We have many pages, and one page with assigned template (/* Template name: News */). I want on main page (index.php) retrieve page(News) url and title. Answer Let ...]]></description>
			<content:encoded><![CDATA[<blockquote><p>
onditions: Page have template, for example: /* Template name: News */</p>
<p>Explaining:</p>
<p>We have many pages, and one page with assigned template (/* Template name: News */).</p>
<p>I want on main page (index.php) retrieve page(News) url and title.
</p></blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>Let me try to summarize what you want and answer:</p>
<p>    I want on main page (index.php) retrieve page(News) url and title.</p>
<p>So you have a &#8220;News&#8221; page that&#8217;s using a specific template called &#8220;News&#8221; and you want to grab that page&#8217;s ID, URL, and title to display on the front page, correct?<br />
Get a Page by Template</p>
<p>There is no built-in way to grab a page based on the template it&#8217;s using. Instead, you have to search for all pages based on a hidden meta value that matches your page template. So, let&#8217;s say your News template is named news-template.php in the theme, then you&#8217;d use the following code to get the first page that use that template:</p><pre class="crayon-plain-tag">$news_pages = get_pages( array(
    'meta_key'   =&gt; '_wp_page_template',
    'meta_value' =&gt; 'news-template.php',
    'number'     =&gt; 1
) );

$news_page = $news_pages[0];</pre><p>Remember, since get_pages() returns an array, you have to manually select the first element of that array. Now this $news_page object contains the content of your News page.<br />
Displaying Page Information</p>
<p>Now, inside your index.php page you can display this page&#8217;s information by referencing the $news_page object.</p>
<p>    Page ID: $news_page->ID<br />
    Page URL: get_page_link( $news_page->ID )<br />
    Page Title: $news_page->post_title</p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/how-to-get-from-sql-query-page-id-and-retrieve-it-url-and-title/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upload file to remote storage</title>
		<link>http://w3xperts.com/upload-file-to-remote-storage/</link>
		<comments>http://w3xperts.com/upload-file-to-remote-storage/#comments</comments>
		<pubDate>Mon, 14 May 2012 13:54:37 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[plugin-development]]></category>
		<category><![CDATA[uploads]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=871</guid>
		<description><![CDATA[I am looking to overwrite the existing upload functionality to save the file on a remote storage service. The remote storage has an HTTP interface that allow me to post file and return an addressable URL back. The reason for ...]]></description>
			<content:encoded><![CDATA[<blockquote><p>
I am looking to overwrite the existing upload functionality to save the file on a remote storage service. The remote storage has an HTTP interface that allow me to post file and return an addressable URL back. The reason for doing this is that the remote storage service has large amount of space and is automatically replicated for high-availability.</p>
<p>I have already figured out how to send files across. However, I am not sure which hook/function I should use to overwrite the existing behavior.</p>
</blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>Two options:</p>
<p>    Hook into &#8216;wp_handle_upload&#8217;, a filter provided by the function wp_handle_upload() in wp-admin/includes/file.php:</p><pre class="crayon-plain-tag">apply_filters( 
        'wp_handle_upload', 
        array( 'file' =&gt; $new_file, 'url' =&gt; $url, 'type' =&gt; $type ), 'upload' 
    )</pre><p>Replace the new file URI with your remote URI.</p>
<p>    The function wp_insert_attachment() in wp-includes/post.php offers two actions:</p><pre class="crayon-plain-tag">do_action('edit_attachment', $post_ID);
    do_action('add_attachment', $post_ID);</pre><p></p>
<p>    You can get the attachment data by $post_ID and change any value here.</p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/upload-file-to-remote-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing error/warning messages from a meta box to “admin_notices”</title>
		<link>http://w3xperts.com/passing-errorwarning-messages-from-a-meta-box-to-admin_notices/</link>
		<comments>http://w3xperts.com/passing-errorwarning-messages-from-a-meta-box-to-admin_notices/#comments</comments>
		<pubDate>Mon, 14 May 2012 13:51:54 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=869</guid>
		<description><![CDATA[I have a simple meta box that updates the post custom fields (using update_post_meta()). How can I send a error or warning message to the next page after the user publishes/updates the post and doesn&#8217;t fill one of the meta ...]]></description>
			<content:encoded><![CDATA[<blockquote><p>
I have a simple meta box that updates the post custom fields (using update_post_meta()).</p>
<p>How can I send a error or warning message to the next page after the user publishes/updates the post and doesn&#8217;t fill one of the meta box fields (or fills them with invalid data) ?</p>
</blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>You can do this by hand, but WP natively does it like this for settings errors:</p>
<p>    add_settings_error() to create message.<br />
    Then set_transient(&#8216;settings_errors&#8217;, get_settings_errors(), 30);<br />
    settings_errors() in admin_notices hook to display (will need to hook for non-settings screens).</p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/passing-errorwarning-messages-from-a-meta-box-to-admin_notices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get data from an array using get_user_meta()</title>
		<link>http://w3xperts.com/how-to-get-data-from-an-array-using-get_user_meta/</link>
		<comments>http://w3xperts.com/how-to-get-data-from-an-array-using-get_user_meta/#comments</comments>
		<pubDate>Sat, 12 May 2012 15:02:23 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[get-user-meta]]></category>
		<category><![CDATA[usermeta]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=539</guid>
		<description><![CDATA[I have created a custom user profile field [crayon-4fb6179cdde87/] I now need to use the data on the front end of wordpress to display information. I think I need to use the get_user_meta() function but I do not understand how ...]]></description>
			<content:encoded><![CDATA[<blockquote><p>
I have created a custom user profile field</p><pre class="crayon-plain-tag">&lt;?php $basics = get_the_author_meta( 'fbasics', $user-&gt;ID ); ?&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;input value=&quot;lesson1&quot; name=&quot;fbasics[]&quot; &lt;?php if (is_array($basics)) { if (in_array(&quot;lesson1&quot;, $basics)) { ?&gt;checked=&quot;checked&quot;&lt;?php } }?&gt; type=&quot;checkbox&quot; /&gt; &lt;?php _e('Lesson 1', 'gprofile'); ?&gt;&lt;/li&gt;
        &lt;li&gt;&lt;input value=&quot;lesson2&quot; name=&quot;fbasics[]&quot; &lt;?php if (is_array($basics)) { if (in_array(&quot;lesson2&quot;, $basics)) { ?&gt;checked=&quot;checked&quot;&lt;?php } }?&gt; type=&quot;checkbox&quot; /&gt; &lt;?php _e('Lesson 2', 'gprofile'); ?&gt;&lt;/li&gt;
    &lt;/ul&gt;</pre><p>I now need to use the data on the front end of wordpress to display information. I think I need to use the get_user_meta() function but I do not understand how to use is to get the value of an array.</p>
<p>How to get data from an array using get_user_meta()?</p>
</blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>The function is <?php get_user_meta($user_id, $key, $single); ?></p>
<p>The $single is a boolean that returns a single value for true or an array if set to false, in your case you would set it to false.</p><pre class="crayon-plain-tag">$user_output =  get_user_meta($user_id, 'fbasics', false);
 var_dump($user_output);</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/how-to-get-data-from-an-array-using-get_user_meta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Taxonomies with Vote It Up plugin chart</title>
		<link>http://w3xperts.com/using-taxonomies-with-vote-it-up-plugin-chart/</link>
		<comments>http://w3xperts.com/using-taxonomies-with-vote-it-up-plugin-chart/#comments</comments>
		<pubDate>Sat, 12 May 2012 15:00:31 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[plugin-development]]></category>
		<category><![CDATA[plugin-recommendation]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Vote Me Up plugin]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=537</guid>
		<description><![CDATA[I am using the Vote Me Up plugin http://wordpress.org/extend/plugins/vote-it-up/ on my site. I have the MostVotedAllTime function showing the top 10 posts. Currently this displays the Post Title only. I am wondering if it is possible to display a custom ...]]></description>
			<content:encoded><![CDATA[<blockquote><p>
I am using the Vote Me Up plugin <a href="http://wordpress.org/extend/plugins/vote-it-up/">http://wordpress.org/extend/plugins/vote-it-up/</a> on my site. I have the MostVotedAllTime function showing the top 10 posts. Currently this displays the Post Title only. I am wondering if it is possible to display a custom taxonomy associated with the post here.</p>
<p>for example it is a chart showing music albums where the post title is the album title. I have a taxonomy called artist which i would also like to display in the chart.</p>
<p>Does anybody know if this is possible or if there are any better plugins for this?</p>
<p>Here is the code for the MostVotedAlltime() function</p><pre class="crayon-plain-tag">function MostVotedAllTime_Widget() {
$a = SortVotes();
//Before

?&gt;
&lt;div class=&quot;votewidget&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Most Voted&lt;/div&gt;
&lt;?php
$rows = 0;

//Now does not include deleted posts
$i = 0;
while ($rows &lt; get_option('voteiu_widgetcount')) {
if ($a[0][$i][0] != '') {
        $postdat = get_post($a[0][$i][0]);
    if (!empty($postdat)) {
        $rows++;

        if (round($rows / 2) == ($rows / 2)) {
            echo '&lt;div class=&quot;fore&quot;&gt;';
        } else {
            echo '&lt;div class=&quot;back&quot;&gt;';
        }
        echo '&lt;div class=&quot;votecount&quot;&gt;'.$a[1][$i][0].' '.Pluralize($a[1][$i][0], 'votes', 'vote').' &lt;/div&gt;&lt;div&gt;&lt;a href=&quot;'.$postdat-&gt;guid.'&quot; title=&quot;'.$postdat-&gt;post_title.'&quot;&gt;'.$postdat-&gt;post_title.'&lt;/a&gt;&lt;/div&gt;';
        echo '&lt;/div&gt;';
    }
}
if ($i &lt; count($a[0])) {
$i++;
} else {
break; //exit the loop
}
}
//End
?&gt;</pre><p>
</p></blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>Use get_the_term_list() to print the assigned terms.</p>
<p>Example:</p><pre class="crayon-plain-tag">echo '&lt;div class=&quot;votecount&quot;&gt;' . /* stripped */ . '&lt;/div&gt;';
    echo echo get_the_term_list( $post-&gt;ID, 'taxonomyname', 'Taxonomy Label: ', ', ', '' );
    echo '&lt;/div&gt;';</pre><p>Replace &#8216;taxonomyname&#8217; and &#8216;Taxonomy Label: &#8216; with the values you actually need.</p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/using-taxonomies-with-vote-it-up-plugin-chart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I find if a page has a template?</title>
		<link>http://w3xperts.com/how-do-i-find-if-a-page-has-a-template/</link>
		<comments>http://w3xperts.com/how-do-i-find-if-a-page-has-a-template/#comments</comments>
		<pubDate>Sat, 12 May 2012 14:56:06 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[meta-query]]></category>
		<category><![CDATA[page-template]]></category>
		<category><![CDATA[query]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=534</guid>
		<description><![CDATA[So I&#8217;m doing a query like this: $the_query = new WP_Query( array( &#8216;meta_key&#8217; => &#8216;homepage&#8217;, &#8216;meta_value&#8217; => &#8216;yes&#8217;, &#8216;post_type&#8217; => &#8216;page&#8217;, &#8216;orderby&#8217; => &#8216;modified&#8217;, &#8216;posts_per_page&#8217; => 1 ) ); To get a single page with a specific key value, how ...]]></description>
			<content:encoded><![CDATA[<blockquote><p>
So I&#8217;m doing a query like this:</p>
<p>    $the_query = new WP_Query( array( &#8216;meta_key&#8217; => &#8216;homepage&#8217;, &#8216;meta_value&#8217; => &#8216;yes&#8217;,<br />
&#8216;post_type&#8217; => &#8216;page&#8217;, &#8216;orderby&#8217; => &#8216;modified&#8217;, &#8216;posts_per_page&#8217; => 1 ) );</p>
<p>To get a single page with a specific key value, how do I get the page template from a query like this, if it has one?
</p></blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>This should do the trick for you. This shows what template file is stored in post_meta, if one has been selected in the admin panel:</p><pre class="crayon-plain-tag">$template_name = get_post_meta( $the_query-&gt;post-&gt;ID, '_wp_page_template', true );</pre><p>If you want to see if the page is the homepage, use is_home() or is_front_page().</p>
<p>If you want to see what template files are generating the page, use this in your functions.php:</p><pre class="crayon-plain-tag">// Returns a list of files used to generate the page.
function wpse51906_list_template_names() {
    echo '&lt;pre&gt;';
    foreach ( debug_backtrace() as $called_file ) {
        print_r( $called_file['file'] );
        echo '&lt;hr /&gt;';
    }
    echo '&lt;/pre&gt;';
}
add_action( 'shutdown', 'wpse51906_list_template_names' );</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/how-do-i-find-if-a-page-has-a-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to show total view count across all posts for an author</title>
		<link>http://w3xperts.com/how-to-show-total-view-count-across-all-posts-for-an-author/</link>
		<comments>http://w3xperts.com/how-to-show-total-view-count-across-all-posts-for-an-author/#comments</comments>
		<pubDate>Sat, 12 May 2012 14:51:57 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=527</guid>
		<description><![CDATA[I&#8217;m using wp-postviews to track views for posts by authors on my site. It stores the view count in the post meta field $views. I&#8217;d want to show on their profile a total count of views for all their posts ...]]></description>
			<content:encoded><![CDATA[<blockquote><p>
I&#8217;m using wp-postviews to track views for posts by authors on my site. It stores the view count in the post meta field $views. I&#8217;d want to show on their profile a total count of views for all their posts combined. How to do that?
</p></blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>A list of posts in the format:</p>
<blockquote><p>
    Post views by Author: Author Name</p>
<p>        Post Title (15)<br />
        Post Title (67)<br />
        Post Title (4)</p>
<p>    Total Number of views: 86
</p></blockquote>
<p></p><pre class="crayon-plain-tag">$author_id = ''; // do stuff to get user ID

$author_posts = get_posts( array(
    'author' =&gt; $author_id
) );

$counter = 0; // needed to collect the total sum of views

echo '&lt;h3&gt;Post views by Author:&lt;/h3&gt;&lt;ul&gt;'; // do stuff to get author name
foreach ( $author_posts as $post )
{
    $views = absint( get_post_meta( $post-&gt;ID, 'views', true ) );
    $counter += $views;
    echo &quot;&lt;li&gt;{$post-&gt;post_title} ({$views})&lt;/li&gt;&quot;;
}
echo &quot;&lt;/ul&gt;&lt;hr /&gt;&lt;p&gt;Total Number of views: &lt;strong&gt;{$counter}&lt;/strong&gt;&lt;/p&gt;&quot;;</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/how-to-show-total-view-count-across-all-posts-for-an-author/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to programatically set the post title of a CPT on wp-admin</title>
		<link>http://w3xperts.com/how-to-programatically-set-the-post-title-of-a-cpt-on-wp-admin/</link>
		<comments>http://w3xperts.com/how-to-programatically-set-the-post-title-of-a-cpt-on-wp-admin/#comments</comments>
		<pubDate>Fri, 11 May 2012 12:58:39 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[custom-field]]></category>
		<category><![CDATA[custom-post-types]]></category>
		<category><![CDATA[wp-admin]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=404</guid>
		<description><![CDATA[I&#8217;ve been playing with custom post types &#038; custom fields, using a combination of the types plugin and the advanced custom fields plugin, also having done the same manually. Occasionally I want to create a CPT where a title would ...]]></description>
			<content:encoded><![CDATA[<blockquote><p>
I&#8217;ve been playing with custom post types &#038; custom fields, using a combination of the types plugin and the advanced custom fields plugin, also having done the same manually.</p>
<p>Occasionally I want to create a CPT where a title would be inappropriate &#8211; for example, an FAQ where I want two fields labelled Question and Answer. This does work without a title, however they all get saved as (No Title).</p>
<p>What I&#8217;d like to do is either set the title to the value of the Question custom field, or somehow define my own title field that I can label as I like.</p>
<p>Does anyone have any pointers on how to acheive this?</p>
</blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>You can use the enter_title_here filter:</p><pre class="crayon-plain-tag">add_filter('enter_title_here','wpse51871_alter_title_label',10,2);
    function wpse51871_alter_title_label($label, $post){
        if( 'question' == get_post_type($post) )
            $label = __('enter question here', 'my-plugin-text-domain');

        return $label;
    }</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/how-to-programatically-set-the-post-title-of-a-cpt-on-wp-admin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Genesis menu position change</title>
		<link>http://w3xperts.com/genesis-menu-position-change/</link>
		<comments>http://w3xperts.com/genesis-menu-position-change/#comments</comments>
		<pubDate>Fri, 11 May 2012 12:55:39 +0000</pubDate>
		<dc:creator>Shaon</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[genesis-theme-framework]]></category>

		<guid isPermaLink="false">http://w3xperts.com/?p=401</guid>
		<description><![CDATA[Sorry for silly question, I&#8217;m pretty new in WordPress and Genesis. I want to move Genesis menu above header. How can I do that? Answer Just add the snippets in Genesis Theme function, in functions.php [crayon-4fb6179ce4526/]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
Sorry for silly question, I&#8217;m pretty new in WordPress and Genesis. I want to move Genesis menu above header. How can I do that?
</p></blockquote>
<h2 style="text-align: center;">Answer</h2>
<p>Just add the snippets in Genesis Theme function, in functions.php</p><pre class="crayon-plain-tag">remove_action('genesis_after_header','genesis_do_nav');
add_action('genesis_before_header','genesis_do_nav');</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://w3xperts.com/genesis-menu-position-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

