Title: M3N's Replies | WordPress.org

---

# M3N

  [  ](https://wordpress.org/support/users/m3n/)

 *   [Profile](https://wordpress.org/support/users/m3n/)
 *   [Topics Started](https://wordpress.org/support/users/m3n/topics/)
 *   [Replies Created](https://wordpress.org/support/users/m3n/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/m3n/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/m3n/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/m3n/engagements/)
 *   [Favorites](https://wordpress.org/support/users/m3n/favorites/)

 Search replies:

## Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Download Manager] Download /download page is pointing to 404?](https://wordpress.org/support/topic/download-download-page-is-pointing-to-404/)
 *  [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/download-download-page-is-pointing-to-404/#post-8197851)
 * doesn’t this ability (index of all download posts) presented in this plugin by
   default ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Download Manager] Download /download page is pointing to 404?](https://wordpress.org/support/topic/download-download-page-is-pointing-to-404/)
 *  [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/download-download-page-is-pointing-to-404/#post-8197819)
 * Hello and thank you for this plugin guys.
    I have a question related to this 
   topic. How can I get an index link that shows all my downloads ? for example 
   enter _sitename.com/downloads_ and all download posts I created with this plugin
   showed on this link. How can I do that ?
 * thanks in advance.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to query different categories on index?](https://wordpress.org/support/topic/how-to-query-different-categories-on-index/)
 *  Thread Starter [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/how-to-query-different-categories-on-index/#post-5914541)
 * The problem is I don’t know how many categories my customer may have. I want 
   to sell a theme to 10 person. One may have 4 category, others may have 9 category.
   I don’s know category ID’s, etc. How can I do that ?
    As I said before, I’m new
   to WP. If it’s possible to use WP_Query in this situation, I appreciate if you
   can provide a sample code for doing that.
 * Thanks.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Manage sticky post content (for ads purpose) via the admin panel](https://wordpress.org/support/topic/manage-sticky-post-content-for-ads-purpose-via-the-admin-panel/)
 *  Thread Starter [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/manage-sticky-post-content-for-ads-purpose-via-the-admin-panel/#post-5586048)
 * Thanks catacaustic.
    I read about Options API and worked a little with it. Now
   I can save the field’s content in the database and retrieve that using Options
   API. But I can’t figure out how I can show those data in my theme. I don’t talk
   about get_option(), I know about that. The thing is, in my index page, I want
   two sticky post above all of posts that stays there in ALL index pages (so sticky
   post is not an option). I don’t know how I can create those two or more posts
   that stays there all the time and I totally Lost here. When I figure out how 
   to do this, retrieve the content from wp_option table using Options API isn’t
   so hard I think.
 * Thanks…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [give site owner the ability to change to footer text](https://wordpress.org/support/topic/give-site-owner-the-ability-to-change-to-footer-text/)
 *  Thread Starter [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/give-site-owner-the-ability-to-change-to-footer-text/#post-5578450)
 * Damn…I’m an Idiot.
    the $option_name in register_setting function should match
   the option ID, but those two, didn’t match in my codes. so that didn’t work for
   me. I changed $option_name argument in my register_setting & corresponding arguments
   in get_option, etc, and everything works just fine. Thanks.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [give site owner the ability to change to footer text](https://wordpress.org/support/topic/give-site-owner-the-ability-to-change-to-footer-text/)
 *  Thread Starter [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/give-site-owner-the-ability-to-change-to-footer-text/#post-5578434)
 * I had big problem in my code that I solved, but still it doesn’t work.
    I didn’t
   write the form element itself!! Know the codes are like this: In functions.php
 *     ```
       function m3n_admin_menu_init() {
           add_menu_page( 'M3N Theme Options', 'M3N Settings', 'manage_options', 'm3n-theme-options', 'm3n_menu_init' );
       }
       add_action( 'admin_menu', 'm3n_admin_menu_init' );
   
       function m3n_menu_init() {
           echo '<div class="wrap">';
           echo '<h2>M3N Theme Settings</h2>';
             echo '<form action="options.php" method="POST">';
             settings_fields( 'm3n_settings_group' );
             do_settings_sections( 'm3n-theme-options' );
             submit_button();
             echo '</form>';
           echo '</div>';
       }
   
       function m3n_settings_init() {
           register_setting( 'm3n_settings_group', 'm3n_settings_name' );
           add_settings_section( 'section-one', 'General Settings', 'm3n_section_init', 'm3n-theme-options' );
           add_settings_field( 'field-one', 'Footer Settings', 'm3n_footer_field_init', 'm3n-theme-options', 'section-one' );
       }
       add_action( 'admin_init', 'm3n_settings_init' );
   
       function m3n_section_init() {
           echo '<p>Enter your text for Footer</p>';
       }
       function m3n_footer_field_init() {
           $options = get_option( 'm3n_settings_name' );
           echo '<textarea name="field-one" id="field-one" rows="3" value="' . $options . '"></textarea>';
       }
       ```
   
 * In footer.php :
    `<p><?php echo get_option( 'm3n_settings_name' ); ?></p>`
 * But as I said, it doesn’t work still.
    Any help would be appreciated.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [give site owner the ability to change to footer text](https://wordpress.org/support/topic/give-site-owner-the-ability-to-change-to-footer-text/)
 *  Thread Starter [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/give-site-owner-the-ability-to-change-to-footer-text/#post-5578419)
 * Hello Catacaustic and thanks for your response.
    I think my real problem is in
   my functions.php. Look at my functions.php’s code please (specially last function):
 *     ```
       function m3n_admin_menu_init() {
           add_menu_page( 'M3N Theme Options', 'M3N Settings', 'manage_options', 'm3n-theme-options', 'm3n_menu_init' );
       }
       add_action( 'admin_menu', 'm3n_admin_menu_init' );
   
       function m3n_menu_init() {
           echo '<div class="wrap">';
           echo '<h2>M3N Theme Settings</h2>';
           settings_fields( 'm3n_settings_group' );
           do_settings_sections( 'm3n-theme-options' );
           submit_button();
       }
   
       function m3n_settings_init() {
           register_setting( 'm3n_settings_group', 'm3n_settings_name' );
           add_settings_section( 'section-one', 'General Settings', 'm3n_section_init', 'm3n-theme-options' );
           add_settings_field( 'field-one', 'Footer Settings', 'm3n_footer_field_init', 'm3n-theme-options', 'section-one' );
       }
       add_action( 'admin_init', 'm3n_settings_init' );
   
       function m3n_section_init() {
           echo '<p>Enter your text for Footer</p>';
       }
       function m3n_footer_field_init() {
           $options = get_option( 'm3n_settings_name' );
           echo '<textarea name="m3n_settings_name" id="m3n_settings_name" rows="3" value="$options"></textarea>';
       }
       ```
   
 * What’s wrong with my last function ?
    What should I write inside the value attribute?
 * Also I wrote what you said in my footer.php but it didn’t worked. I think the
   main problem is in my last function in functions.php which I referred to above.
 * Thank You.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [how to prevent WP from generating different image sizes, except for featured img](https://wordpress.org/support/topic/how-to-prevent-wp-from-generating-different-image-sizes-except-for-featured-img/)
 *  Thread Starter [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/how-to-prevent-wp-from-generating-different-image-sizes-except-for-featured-img/#post-5555945)
 * Thanks Will.
    The problem is I don’t want to prevent generating different sizes
   for ALL images. I want WP generate all sizes JUST for the first image in my posts(
   because it’s feature image & all generated sizes will be use on index), but NOT
   for other images.
 * Any idea ?
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Customizr] Displaying custom fields when using the Advanced Custom Fields plugin](https://wordpress.org/support/topic/displaying-custom-fields-when-using-the-advanced-custom-fields-plugin/)
 *  [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/displaying-custom-fields-when-using-the-advanced-custom-fields-plugin/#post-5048666)
 * Hello.
    I have problems with custom fields and I appreciate if someone can help
   me on this. I created a Download Box using custom fields & styled it. the code
   is this :
 *     ```
       <div class="download-links">
        <ul>
         <?php $cf_var = get_post_meta( $post->ID, 'download', true );
          if( isset($cf_var) && !empty(cf_var) ) : ?>
           <li class="download">
            <a href="<?php echo get_post_meta( $post->ID, 'download', true ); ?>">Download HQ</a>
           </li>
          <?php endif; ?>
   
        <?php $cf_var = get_post_meta( $post->ID, 'download2', true );
           if( isset($cf_var) && !empty(cf_var) ) : ?>
            <li class="download">
             <a href="<?php echo get_post_meta( $post->ID, 'download2', true ); ?>">Download HQ</a>
            </li>
           <?php endif; ?>
   
        <?php $cf_var = get_post_meta( $post->ID, 'password', true );
           if( isset($cf_var) && !empty(cf_var) ) : ?>
            <li class="download">
              <p>Password: <span><?php echo $cf_var; ?></span></p>
            </li>
           <?php endif; ?>
        </ul>
       </div><!-- end of .download-links -->
       ```
   
 * So I styled them in styles.css .
    The problem is whether the post has custom 
   field assigned, or not, the Download Box is showing.
 * After reading this topic, I end up with this in my functions.php :
 *     ```
       /**
        * Download box using Custom Fields
        */
       function display_download_box() {
       	if( !is_singular() ) {
       		return;
       	}
       	$custom_fields_array() = array(
       		'download'	=>	'download',
       		'download2'	=>	'download2',
       		'password'	=>	'password',
       	);
       	$output = custom_fields_iteration( $custom_fields_array );
       	if( strlen($output) > 0 ) {
       		echo '<div class="download-links">' . $output . '</div>';
       	}
       }
       function custom_fields_iteration( $custom_fields_array ) {
       	$output = '';
       	foreach( $custom_fields_array as $custom_field => $data ) :
       		$custom_field_value = get_post_meta( get_the_ID(), $custom_field, true );
       	$output .= ( strlen($custom_field_value) > 0 ? 'div class="download">
       		<span class="cf_label">' . $data . ': </span>' . $custom_field_value . '</div>' : '');
       	endforeach;
       	echo $output;
       }
       add_action ('__after_content_title', 'display_download_box');
       ```
   
 * But it didn’t worked at all and cause Fatal Error.
 * How can I find out if the post has custom field or not, and then the code run
   and styles applied ?
    I hope you guys can help me. thanks.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to remove Posted on and by](https://wordpress.org/support/topic/how-to-remove-posted-on-and-by/)
 *  [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/how-to-remove-posted-on-and-by/#post-5520051)
 * Also maybe better to hide your comments as such.
    If you want to do that, you
   can use this selector :
 * .post-comments {
    display: none; }
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to remove Posted on and by](https://wordpress.org/support/topic/how-to-remove-posted-on-and-by/)
 *  [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/how-to-remove-posted-on-and-by/#post-5520050)
 * use this selector :
    .post-meta { display: none; }
 * …and I think you’ll get what you want.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to remove Posted on and by](https://wordpress.org/support/topic/how-to-remove-posted-on-and-by/)
 *  [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/how-to-remove-posted-on-and-by/#post-5520037)
 * Can you provide a link to your website ?
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [insert icon in widget title](https://wordpress.org/support/topic/insert-icon-in-widget-title/)
 *  [M3N](https://wordpress.org/support/users/m3n/)
 * (@m3n)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/insert-icon-in-widget-title/#post-5508848)
 * Hi Gunjesh Gaurav.
    You could set background for those headings using these selectors
   respectively :
 *     ```
       .widget-col-3 .widget_awpcp_search_widget .widget-title {
         background-image: url(path/to/image);
       }
   
       .widget-col-3 .widget_wpbdp_searchwidget .widget-title {
         background-image: url(path/to/image);
       }
   
       .widget-col-3 .login .widget-title {
         background-image: url(path/to/image);
       }
       ```
   
 * I hope this work for you…

Viewing 13 replies - 1 through 13 (of 13 total)