Filter/Sort Post Form On Taxonomy page

That happens because wp_dropdown_categories, by default, defines the name of the dropdowns as ‘cat’. You are showing 2 dropdowns in the form, and both are named ‘cat’, because you didn’t define a name for them. So when you submit the form, you get two query vars named cat. For example, if you want the second … Read more

How can I locate the single buddypress forum post template? [closed]

Even if I’m also not quite sure if this question is related to bbPress or BuddyPress, locating (plugin-) template files might always be the same: An easy approach might be to call the body_class() in a file which is definitely active (like header.php). The output will look something like this: class=”forum-archive bbpress archive post-type-archive post-type-archive-forum … Read more

How can add custom commands in post-new.php in wordpress

You could run this code inside of an action on transition post status. Any time a post is published you could run this code to generate and upload the HTML to your FTP server. function post_published( $new_status, $old_status, $post ) { if ( $new_status == ‘publish’ ) { // Build your file and upload it … Read more

Dynamic archive of posts by date

Please note that I have now resolved this issue. For whomever is interested, please find my code below (I’ve included everything to a shortcode to facilitate adding it anywhere I want): function archiveday() { $x=1; do { $result = date(‘l jS F Y’,strtotime(“-$x days”)); $year= date(‘Y’,strtotime(“-$x days”)); $month= date(‘n’,strtotime(“-$x days”)); $day= date(‘j’,strtotime(“-$x days”)); $my_query2 = … Read more

How to show video from post on the all posts page?

For a post format, you can refer to this link https://codex.wordpress.org/Post_Formats To show videos on posts page,just modify the excerpt filter and display the excerpt. Add following code in functions.php function custom_wp_trim_excerpt($text) { $raw_excerpt = $text; if ( ” == $text ) { $text = get_the_content(”); // Original Content $text = strip_shortcodes($text); // Minus Shortcodes … Read more