How to rewrite URL and get the values?

The simplest and quickest solution would be to use the add_rewrite_endpoint function. <?php add_rewrite_endpoint( $name, $places ); ?> So in your case it would be something like this: add_rewrite_endpoint( ‘user’, EP_PERMALINK | EP_PAGES ); An user URL would look like this: http://www.example.com/my-page/user/john To access the variable: $user = get_query_var( ‘user’, false );

help with custom shortcode that stopped working

WordPress 4.2.3 made some changes to the way shortcodes work in order to fix a security issue. See here: https://make.wordpress.org/core/2015/07/23/changes-to-the-shortcode-api/ This is most likely the cause of your problem. See the Shortcodes with Bad Quotes section, and the accompanying workaround suggestion.

Can you add shortcode as a menu item link?

I am not sure about the Shortcode in Menu; but Menu Walker Class is your best bet to achieve what you want. Walker Class will pass on each Menu element to your code, this is where you can catch your menu item and make the desired modal pop-up link for a href of your menu … Read more

How to make a conditional statement within $output in shortcodes.php?

If I understand you right you just want to use a ‘?’ type of if statement: $output=”<div class=”w-blog-entry” style=”padding:0;”> <div class=”w-blog-entry-h”> <div class=”l-subsection color_dark” style=”background-image: url(“.$the_thumbnail.’); background-position: center center; padding-top:0; padding-bottom:0; background-attachment: inherit;”> <div class=”l-subsection-h”> <div class=”l-subsection-hh g-html i-cf” style=”font-family:Century Gothic; text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);”> <a class=”w-blog-entry-link” href=”‘.get_permalink(get_the_ID()).'”><h2 class=”w-blog-entry-title” style=”line-height:1em; margin-left:0; … Read more

FontAwesome Shortcode isn’t working properly

I tested your code, and it worked for me. Is it possible that your server doesn’t support the extract function? Using extract is frowned upon in PHP now. This is the recommended way of extracting shortcode attributes: function addscFontAwesome($atts) { $args = shortcode_atts( array( ‘type’ => ”, ‘size’ => ”, ‘rotate’ => ”, ‘flip’ => … Read more

Metabox Keeps Stripping Parts of Shortcode

I really should get some sleep 😛 The shortcode is [masterslider] and I manually wrote [metaslider].. That meta box must’ve gotten into my mind.. Just change the appropriate line to this: value=”<?php echo esc_html($value); ?>”> and it works. Thanks @Howdy_McGee for pointing me to the right direction! Also @s_ha_dum for additional knowledge.