Pass post title as URL parameter

I think adding the new link by hook will be the best way. function new_nav_menu_items($items) { global $post; $post_slug=$post->post_name; $landinglink = ‘<li class=”home”><a href=”‘ .get_page_link(‘YOUR_LANDING_PAGE_ID_HERE’).’?from=’.$post_slug.'”>’ . __(‘BLAA’) . ‘</a></li>’; $items = $items . $landinglink; return $items; } add_filter( ‘wp_nav_menu_items’, ‘new_nav_menu_items’ ); Change ‘YOUR_LANDING_PAGE_ID_HERE’ with landing page ID. Cheers

Shortcode not interpreted if parameter set

Not enough code in the question to pinpoint the problem, but I would call what you are trying to do “shady”. Usage of do_shortcode should be confined to extreme cases when it is impossible, or extremely hard, to do anything else, as using it is the less evil equivalent of using eval. What you should … Read more

Add addtional page parameter before loading the page

Set a variable $product_view=isset($_GET[‘product_view’]) ? $_GET[‘product_view’] : ‘grid’; Now, how to keep it like this with pagination URL’s. echo paginate_links(array( ‘base’ => add_query_arg(‘product_view’, $product_view), ‘format’ => ”, ‘prev_text’ => __(‘&laquo;’), ‘next_text’ => __(‘&raquo;’), ‘total’ => ceil($total / $items_per_page), ‘current’ => $page, ‘add_args’ => array( ‘category’ => ‘fruit’, ‘color’ => ‘red’ ) )); I hope this … Read more

How to pass username in url

First, you should check if the user is logged in – use is_user_logged_in(). Next step is to get ID of current user with get_current_user_id(). Next, get the URL for the author with the given ID using get_author_posts_url(). The last step is to display the button with the link. if ( is_user_logged_in() ) { $uid = … Read more

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