posts from multiple post types in one slider

Multiple Post type in one slider Shortcode Using This Shortcode For Owl Carousel In Your Page And Add Your Custom Post Type In The Arguments of Query Put This Code in Your functions.php add_action( ‘wp_enqueue_scripts’, ‘my_child_enqueue_styles’ ); function my_child_enqueue_styles() { wp_enqueue_style(‘styleowl’,’https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.0.0-beta.2.4/assets/owl.carousel.min.css’); wp_enqueue_style(‘style1′,’https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.0.0-beta.2.4/assets/owl.theme.default.min.css’); wp_enqueue_script(‘pro-owl’,’https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.1/owl.carousel.min.js’,array( ‘jquery’ ), ”, false); wp_enqueue_script(‘jquery’,’https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js’,false); } add_shortcode(‘post_slider’,’custom_slider’); function custom_slider(){ $args = array( … Read more

How to run wp cli from a wp hook?

Depends on what you want to do. If you want to run the PHP code that’s behind the WP-CLI code you might consider looking at https://github.com/wp-cli/entity-command Maybe you don’t actually need WP-CLI but the corresponding code behind it. Most WP-CLI commands have WordPress equivalents. For example of what I was trying to do today, the … Read more

WordPress Custom Pages that work with Plugins?

Create a Search Page Template If you do not have a page.php, you can create one based upon your Theme’s index.php template file. Note: The filename search.php is reserved as a special template name, so avoid its usage; the suggested searchpage.php just makes it easy to recognize in the list of files -At the top … Read more

Get custom title if category

change this one line in your code: <h1 class=”article-title entry-title”>How To <?php the_title(); ?> Free</h1> to: CORRECTION: <h1 class=”article-title entry-title”><?php if( in_category( array(‘news’) ) ) { the_title(); } else { ?> How To <?php the_title(); ?> Free<?php } ?></h1> https://developer.wordpress.org/reference/functions/in_category/

Where is the PHP code generating an element?

You can ask a dozen developers how they work with themes or plugins and you’ll get a dozen different answers. My method is to use NetBeans to edit php files stored locally on my computer and then ftp (NetBeans upload) them to a test server with wp_debug turned on. NetBeans turns the theme or plugin … Read more

my post slug gets really long and I can’t change it

This is because you’re using characters that aren’t valid in URLs: קידום-מנצח URLs only allow a limited subset of ASCII characters In order for these characters to work in a URL, they have to be encoded. For example if I visit example.com/foo bar/ the space isn’t valid in URLs, so it gets turned into example.com/foo%20bar/, … Read more

I have added a metabox and inside it i added a secondary title and a text editor but if i write anything it does not save it or show it on my page

You have used $post instead of $_POST in save function. That is why data is not saved. You have should use : $_POST[ ‘custom_meta2_nonce’ ] $_POST[‘sec_title’] $_POST[‘principle_duties’] instead of $POST[ ‘custom_meta2_nonce’ ] $POST[‘sec_title’] $POST[‘principle_duties’] Use below code to save data : function custom_meta2_save($post_id){ //checks save status $is_autosave = wp_is_post_autosave( $post_id); $is_revision = wp_is_post_revision( $post_id); $is_valid_nonce … Read more