How to Find WordPress Page and Post IDs

How to Find WordPress Page and Post IDs

WordPress page or post IDs can be used for various WordPress plugins and services that need an appropriate ID structure to operate. A simple way to find your WordPress page or post ID is to visit the specific page or post in your WordPress administration dashboard and observe the URL in your internet browser’s address bar.

  • Our post ID in the picture below is: 6089 because the URL says post=6089

Find WordPress Post Page ID

How to display recent posts on WordPress pages

How to display recent posts on WordPress pages

There are many ways to display recent posts on WordPress pages without using bulky plugins and default features that cause headaches and slow down your website. There are also different options you can use to embed certain WordPress posts. For example, you can display recent posts in a list, display recent posts in a drop-down menu, and you can even display all WordPress posts if you wish to.

The PHP codes below can be added into your WordPress template pages and files in order to display recent WordPress posts on certain pages.

Display recent posts in a list

<?php get_archives('postbypost', '30', 'custom', '', '<br />'); ?>

The above PHP snippet will allow you to display 30 recent posts. To change the amount of recent posts to display, simply change the 30 to any number.

Display recent posts per day(s)

<?php wp_get_archives('type=daily&limit=15'); ?>

The above PHP snippet can be used to display the most recent WordPress posts from the last 15 days. To change the amount of days pulled, switch the 15 above with any numeric.

Display recent posts per month(s)

<?php wp_get_archives('type=monthly&limit=12'); ?>

The above PHP snippet can be used to display the most recent WordPress posts from the last 12 months (1 year). To change the amount of  months, switch the 12 above with any numeric.

Display recent syndication feeds

if ( isset ( $query->query_vars['feed'] ) and ( $query->query_vars['feed'] == 'ics' ) )
{
	add_filter( 'post_limits', '__return_empty' );
}

The “Syndication feeds show the most recent” or ‘posts_per_rss‘ parameters in Settings > Reading will overwrite any ‘posts_per_page‘ parameter in a query used in a feed. Read More.

Display recent posts in a drop-down list

<form id="archiveform" action="">
<select name="archive_chrono" onchange="window.location =
(document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
<option value=''>Select Month</option>
<?php get_archives('monthly','','option'); ?>
</select>
</form>

Use this to display a drop-box menu of your monthly archives with post counts displayed.

You also can use the piece of code below instead to show month lists, including the number of posts/month.

 <select name="archivemenu" onChange="document.location.href=this.options[this.selectedIndex].value;">
 <option value="">Select month</option>
 <?php get_archives('monthly',,'option',,,'TRUE'); ?>
 </select>

Display all WordPress posts alphabetically

<?php wp_get_archives('type=alpha'); ?>

Display all your WordPress posts alphabetically. Sure it’s not essentially display “recent” posts but is an alternative.

How to create a WordPress Archive page

How to create a WordPress Archive page

Easiest way to create a WordPress archive page. There are tons of easy ways to create an exciting WordPress archives page. There are also tons of WordPress tutorials floating around the internet that offer minimal guidelines in doing so for those whom have not been introduced to making proper WordPress page templates. So this article will explain how to create a WordPress archive page that you can use as a page template.

How to enable and use shortcodes in WordPress widgets

How to enable and use shortcodes in WordPress widgets

How to enable and use shortcodes in WordPress widgets using a PHP code. The code on this webpage will allow you to use shortcodes inside WordPress widgets. It works just like default widgets that utilize the do_shortcode function.

WordPress shortcodes were created to be used as a shortcut;  Therefor, by default shortcodes do not translate when placed into the WordPress text widget or other widget that allows you to input text. Furthermore, most WordPress themes do not include the function that allows you to the use of shortcodes inside WordPress widgets. However, if you use this code you will be able to use the shortcodes programmed by your theme inside your widget areas.

Copy and paste the PHP code below into your current theme’s functions.php file and click Update.

add_filter('widget_text''do_shortcode');

The best bbPress shortcodes for WordPress

The best bbPress shortcodes for WordPress

This is a list of the best bbPress shortcodes for WordPress websites. Default bbPress shortcodes can be used to create macros that are used in the layout of the forum content of your WordPress pages. The shortcodes can be inserted into any WordPress page, including widget spaces and PHP/template files.

 How to use BBPress Shortcodes

To use a BBPress Shortcode, simply copy and paste (insert) the code into your desired WordPress page and remove the space between [ and bbp  in the code.

BBPress Shortcode Example

bbPress account shortcodes

bbPress account shortcodes are used to easily display the login, register, and password reset forms.

If your WordPress theme does not have additional bbPress template pages, these shortcodes can be used to create separate pages, such as a login page.

Login form

[ bbp-login]

Register form

[ bbp-register]

Password reset form

[ bbp-lost-pass]

bbPress forums shortcodes

bbPress forums shortcodes can be used to display your bbPress forum on your WordPress website. You can display a “New Forum” form and display single forum topics.

These forum shortcodes are great for creating a forum index (aside from the existing BBPress forums page ) if needed and work well when establishing internal links between article/post and forum content.

Show all bbPress forums

[ bbp-forum-index]

New Forum form

[ bbp-forum-form]

How to display single forums

[ bbp-single-forum id=$forum_id=1234]

To display single bbPress forums (not single topics) replace 1234 in the shortcode above with your forum ID.

bbPress topic shortcodes

The shortcodes below will allow you to add forum topics to a WordPress page or create a topic page (index) if needed, as well as display the “New Topic” form, and single topics. Included are also shortcodes to display bbPress topic tag clouds.

 Topic index (15 most recent bbPress topics)

[ bbp-topic-index]

New Topic form

[ bbp-topic-form]

How to display single topics

[ bbp-single-topic id=$topic_id=5678]

To display single bbPress forum topics (not single forums) replace 5678 in the Sshortcode above with your bbPress topic ID.

Topic tag cloud

[ bbp-topic-tags]

How to display a list of bbPress topics with the same tag

[ bbp-single-tag id=$tag_id=91011]

To display a list for a single bbPress topic tag replace 91011 in the shortcode above with your bbPress topic ID.

How to fix “ERROR: Your topic cannot be created at this time” bbPress

How to fix “ERROR: Your topic cannot be created at this time” bbPress

ERROR: Your topic cannot be created at this time is a bbPress error message that occurs when the user is restricted from creating a topic. The ERROR: Your topic cannot be created at this time message in bbpress can occur for different reasons:

ERROR: Your topic cannot be created at this time

1. A WordPress spam plugin is enabled and blocked the user from publishing a blacklisted word

If you use a WordPress forum spam plugin or plugin that blocks comments based on certain trigger words your plugin may have caused the error message to occur. In order to fix the ERROR: Your topic cannot be created at this time message you will need to examine your plugins settings in order to determine what triggered the error message and remove the trigger if it is necessary.

2. The user attempted to publish a word that has been added to the Comment Blacklist

wordpress comment blacklist

The WordPress Comment Blacklist is located in the Settings > Discussion page. The blacklist will block certain words inputted into the blacklist. If you use this blacklist it may have caused the error message to occur. If this is the case you will need to examine your plugins settings in order to determine what triggered the error message and remove the trigger if it is necessary.

Also See: The best bbpress shortcodes

How to remove the yellow background behind Google AdSense ads

How to remove the yellow background behind Google AdSense ads

adsense ad yellow backgroundThere are two primary reasons why you might see a yellow background behind Google AdSense advertisements on your website. You might notice the yellow color before and after advertisements load on your website. For one, many WordPress themes automatically have the <ins> tag (also known as the ins attribute) set to yellow in your CSS style sheetThe other reason could be that the <ins> tag is set around a Google advertisement like: <ins>Advertisement Script</ins>. The ins attribute/tag defines additional text to a document and is commonly used to markup updates and modifications made to a website. The yellow hex color used is #fff9c0 or #ff9 depending on your WordPress theme.

How to remove the Google AdSense yellow background

1. Open your style.css file and search for the color: #fff9c0 or #ff9. You can find your CSS style sheet for WordPress websites at this path: Appearance > Editor and you can type Ctrl+F to enable a search field in your browser.

2. If there is a result matching #fff9c0 or #ff9 on your CSS style sheet you will want to change it to your website’s background color (such as #ffffff for white or #000000 for black). You can also delete the color entirely.

Here are a few examples of what the code you’re looking for might look like:

ins {
 background: #fff9c0;
 text-decoration: none;
}
ins, .ins {
background-color: #ff9;
color: #000;
text-decoration: none;
ins { background: #ff9; color: #000; text-decoration: none; }

How to disable the WordPress Admin Bar

How to disable the WordPress Admin Bar

The WordPress admin bar is the gray bar located at the top of your WordPress website. The WordPress admin bar includes various options and quick access to your WordPress dashboard or webpage.

Some WordPress users may want to disable or hide the WordPress admin bar so we have compiled a list of six different ways to do so. The options include CSS and PHP snippets, as well as using a WordPress plugin or the built in feature to disable the admin bar for specific users.

1. The first option includes copying and pasting the css snippet below and inserting it into your custom.css file or your primary css style sheet.

Enter this code into your current theme’s custom.css or style.css file to disable the admin bar:

#wpadminbar { display:none !important;}

2. The second option includes copying and pasting the php snippet below and inserting it into your functions.php file.

Enter this code into your current theme’s functions.php file to disable the admin bar:

function hide_admin_bar(){ return false; }
add_filter( 'show_admin_bar', 'hide_admin_bar' );

3. The third option includes copying and pasting the php snippet below and inserting it into your functions.php file.

Enter this code into your current theme’s functions.php file to disable the admin bar:

add_filter( 'show_admin_bar', '__return_false' );

4. The fourth option makes the WordPress admin bar only visible to your Admin accounts.

Enter this code into your current theme’s functions.php file:

if (!current_user_can('manage_options')) {
add_filter('show_admin_bar', '__return_false');
}

5. The fifth option includes installing the free “disable admin bar” WordPress plugin.

Follow the link below for the WordPress plugin directory page:

6. The sixth option is standard in WordPress and will hide the toolbar when viewing your website.

Access a WordPress user profile you would like to disable the admin bar for and un-check Show Toolbar when viewing site.

WordPress Show toolbar option

How to fix the GoDaddy white screen of death

How to fix the GoDaddy white screen of death

If your website displays a blank white webpage and is hosted by GoDaddy you have what is referred to as the “GoDaddy white screen of death.” The GoDaddy white screen of death is a very common issue with websites hosted by GoDaddy. The blank white webpage issue with websites hosted by GoDaddy occurs on websites that have WordPress installed on them. It is most commonly linked to the fact that GoDaddy does not appropriately update PHP, or mention the fact that they provide outdated versions of PHP, therefor causing issues with your website and the current version of WordPress. The GoDaddy white screen of death can occur on every website you have hosted with GoDaddy that uses the WordPress content management service. In some cases you may be able to access your website for a certain amount of time only to eventually be greeted by a blank white webpage.

GoDaddy white screen of death fix

The GoDaddy white screen of death has caused many problems for many GoDaddy customers. It restricts access and traffic to the website, it can make you lose your work, and it can harm your SEO and rank on Google search results pages.

How to fix the GoDaddy white screen of death

  • The most common way to fix the GoDaddy white screen of death is to contact support (https://www.godaddy.com/help?ci=) and demand them to update your PHP (or ask nicely). GoDaddy primarily uses outdated and obsolete versions of PHP that do not work alongside newer versions of WordPress as they are released. This is the most adequate way to fix the GoDaddy white screen of death and should take a few hours to completely fix your problem. You can use the GoDaddy chat support system or give them a call by using the support number usually provided at the top of their website: 1 (866) 463-2339.

Aside from an outdated version of PHP there are a number of given reasons why the GoDaddy white screen of death can occur.

  • GoDaddy web hosting cannot handle your WordPress theme. You might want to change your theme and see if this is the issue. If this is the issue you should consider changing your WordPress theme to one that GoDaddy web hosting can appropriately handle or switch hosting providers to another service.
  • GoDaddy web hosting cannot handle a plugin. You might want to disable plugins to see if this is the issue. If you found this to be the issue you should replace your faulty plugin or move your website to a hosting provider that is able to handle simple WordPress plugins.
  • Gzip compression is enabled, but the /tmp directory is full (meaning the webpage output can’t compress and stops before sending it back to browser). This typically happens to all customers on a shared server, rather than a single customer. If this is the issue you must contact GoDaddy support.
  • An opcode cache is in use (eAccelerator, APC, or other), however a script in WordPress is not suitable for caching. If this is the issue you must contact GoDaddy to add an exception to the .ini file to explicitly not cache files on your website.
  • You might be hitting PHP’s memory_limit; that is, your WordPress site plus plugins create executable code that is too large to fit in the allotted memory space. GoDaddy may have specified a lower setting than you need.
  • GoDaddy might be running suhosin or some other PHP security extension that might be blocking the execution of a script. If this is the issue you must contact GoDaddy and demand them to fix this.