Tag Info

New answers tagged

2

You can use the function get_post_types to get information on any and all post types that are active at that time. To get info on a specific post type, use get_post_type_object.


1

WordPress default comes with some sample post types like pages, posts etc. Wordpress has given option to create our own custom post types also. Both default & custom posts are stored in single table "wp_posts" by differentiating all posts types based on "post_type" column in "wp_posts" table. Eg: pages--> post_type="page", testiminials--> ...


1

There is error in sql query. You have defined time as datetime and default value mentioned in current_timestamp. Define time as timestamp. Also specify length of email and page fields. Corrected query: $sql = "CREATE TABLE " . $table_name . " ( id INT NOT NULL AUTO_INCREMENT, time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, //Change datetime to ...


1

Users created in Site_A have roles assigned to them. Same users are available in Site_B but they have no roles assigned. Create a PHP script sync-admins.php with the following code in it: <?php // load WordPress environment require( 'wp-load.php' ); // REPLACE 'siteb_' with table prefix of Site_B in line below! $tblPrefixOfSite_B = 'siteb_'; // ...


0

Had a similar issue to you. Your problem is the ad_trigger field is a TEXT field. You need to make this a VARCHAR to allow for indexing. TEXT types are not stored in the table. Instead a pointer is stored in the table and the data is stored elsewhere. While you can create an index for them, I think this process would be too complicated for use with ...


0

To answear my question: It's a typo. `students_email` VARCHAR 850) NOT NULL, should be: `students_email` VARCHAR (50) NOT NULL, Oh the headache. When the typo is corrected it creates a new table.



Top 50 recent answers are included