2 item in a same menu pointing to 1 page
you’re best bet may be to set a custom class for each of the FAQ links then do a simple jquery on click for that event.
you’re best bet may be to set a custom class for each of the FAQ links then do a simple jquery on click for that event.
Or, you can place this code in your active theme’s functions.php: <?php // First, backup the default $postdata $backup = $post; // Now, override the default $tags = wp_get_post_tags($post->ID); // Now, open the if ( $tags ) statement if ($tags) { $tag_ids = array(); foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id; // Now, setup your custom … Read more
I can think of two methods to accomplish this, either would be equally valid. I will cover the pros and cons of each at the end of the explanation for them. Use a Shortcode Define a shortcode, say [wpse47706_link]. You will probably want to give it an href attribute. Use this for every single link … Read more
Ok then… try this (hope i got your request right): REVISED <?php get_header(); query_posts( array( ‘posts_per_page’ => 5, ‘paged’ => ( get_query_var(‘paged’) ? get_query_var(‘paged’) : 1 ), )); // The Loop if (have_posts()){ while (have_posts()){ //Iterate the cursor on the next post the_post(); echo “<a class=”more-link” href=””; the_permalink(); echo “”><h1>”; the_title(); echo “</h1></a>”; echo “<div … Read more
untested, but it should work theoretically: add_filter(‘get_attached_file’, function($path, $file, $attachment_id){ // get the post object of the current attachment $att = get_post($attachment_id); // prepend attachment post parent ID to the file name return substr_replace($path, “{$att->post_parent}/{$file}”, -strlen($file)); }); Another filter, attempts to “fix” the path returned by WP’s upload handler: add_filter(‘wp_handle_upload’, function($results){ global $post; if(empty($post)) return … Read more
You can filter the title of most widgets and change the markup. The name of the filter is ‘widget_title’ and the third parameter tells you the type of the filtered widget. Sample code, not tested: add_filter( ‘widget_title’, ‘wpse_52108_nav_widget_title_link’, 30, 3 ); /** * Changes the title for the nav menu widget. * * @param string … Read more
This can be solved by making SQL queries directly in the database. But this only works easily for replacing the URL of a link, not the whole link markup. Replacing all bit.ly links with their original long URL would be the best way to solve the blacklist problem. This is the query you would do, … Read more
All in One SEO plugin is setting your FaceBook open graph meta tags. For Facebook to “see” your video, you need to set video meta tags: <meta property=”og:video” content=”http://example.com/movie.swf” /> <meta property=”og:video:secure_url” content=”https://secure.example.com/movie.swf” /> <meta property=”og:video:type” content=”application/x-shockwave-flash” /> <meta property=”og:video:width” content=”400″ /> <meta property=”og:video:height” content=”300″ /> Whether or not this is possible with that plugin … Read more
To replace nofollow with nofollow external _blank Put this code in your theme’s functions.php file to replace text as required. function wpse_60668_relnofollow($text) { $return = str_replace(‘nofollow’, ‘external nofollow _blank’, $text); return $return; } add_filter(‘get_comment_author_link’, ‘wpse_60668_relnofollow’); //this’ll change author link add_filter(‘comment_text’, ‘wpse_60668_relnofollow’); //This’ll change the content
well you did all the hard stuff, so you can try this: while ( $loop->have_posts() ) : $loop->the_post(); $mail = get_post_meta($post->ID, ‘mail’, true); if ($mail) { echo ‘<a href=”https://wordpress.stackexchange.com/questions/60953/mailto:”.$mail.'”>email me at ‘.$mail.'</a>’; } /* … */