How do i get (unique) page name?

The WP global variable $pagename should be available for you, I have just tried with the same setup you specified. $pagename is defined in the file wp-includes/theme.php, inside the function get_page_template(), which is of course called before your page theme files are parsed, so it is available at any point inside your templates for pages. … Read more

Audio and video shortcodes not working properly

Okay, there are two things going on. First, since you are running WordPress 3.6, you don’t need to run any other media player plugins. Deactivate Widgetkit and use the following shortcode to add your audio player: The reason you aren’t seeing the play button on your players is that your web server is not serving … Read more

Convert shortcode into html form [closed]

First off, your shortcodes are not formatted correctly for WordPress. You need to have a tag for your shortcode and then define the attributes separately. Instead of [list-style=”one”][/list-style] it needs to be something like [list class=”one”][/list] The following code will add two shortcodes to your WordPress install. [list] and [li] // shortcode for the list … Read more

esc_attr not working in shortcode

I think I have figured out the problem, though I have yet to solve it. I am running the shortcode in a WP Types custom WYSIWYG field. The shortcode works perfectly everywhere else, including directly in my theme files and in the native WordPress content WYSIWYG, so it seems it is a bug in WP … Read more

Adding shortcode to the main menu

I thought about making this a plugin since so many people ask about it, but here’s what you can do. This is by far the most consistent option that I’ve found because it allows you to do virtually anything you want in menus and doesn’t require writing your own walker class. Install stag custom sidebars … Read more

Extending the Audio Shortcode

I would use the filter wp_audio_shortcode: /** * Filter the audio shortcode output. * * @since 3.6.0 * * @param string $html Audio shortcode HTML output. * @param array $atts Array of audio shortcode attributes. * @param string $audio Audio file. * @param int $post_id Post ID. * @param string $library Media library used for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)