When a user makes a purchase in the shop, would you automatically like to create a post in a post type “cards” with a custom message that would come from a custom field that will be available at checkout?
You can? Would anyone know how to help me?
]]>As soon as I create columns with the text box and the same insert page short code then the content in preview/publish is mashed together, each one in a skinny column. The proportions are all wrong.
Basically how can I please insert posts into columns on a page and have them displaying the content proportionally. I tried the post grid element but it compressed information and gives a read more link.
I can send images if it helps.
Thanks
Thank you!
]]>A user of mine would like to broadcast the posts that are inserted via your plugin.
To do that, I would like an action to hook in to. Perhaps, in includes / feed-importing.php, in the wprss_items_insert_post() function, right at the bottom of the
foreach ( $items as $i => $item ) {
loop… please add something like
do_action( 'wprss_item_inserted', $inserted_ID );
I’d like to be able to select content from the main site and insert it into the subdirectory site. Any guidance would be truly appreciated.
]]> /**
* WPSEO Primary Term
*
* @since ${SINCE}
*
* @param $taxonomy string The taxonomy name
* @param $postID int The post ID
* @param $term int The term ID
*/
private function wpseoPrimaryTerm($taxonomy, $postID, $term)
{
// Seo Yoast support primary term.
if (class_exists(‘WPSEO_Primary_Term’)) {
$primaryTermObject = new \WPSEO_Primary_Term($taxonomy, $postID);
$primaryTermObject->set_primary_term($term);
}
}
the primary is set but I can not find the post in the archive.
We also have a filter system to filter posts even by categories but the post is not there.
I only find it if I update the post from backend.
Is it a problem you have already faced? How can I solve the problem ?
I am able to create new user and I am using wp_insert_post() to do so. The issue is, post is getting inserted twice (duplicate). Below is my code for this :
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['register_doctor'])) {
$docdata = array(
'first_name' => $doc_fname_register,
'last_name' => $doc_lname_register,
'user_login' => $username,
'user_email' => $doc_email_register,
'user_pass' => $doc_conf_pass_register,
'role' => 'doctor'
);
$user_id = wp_insert_user($docdata);
$post = array(
'post_title' => $post_title,
'post_content' => 'test',
'post_type' => 'search_doctors',
'post_status' => 'publish',
'post_author' => 1
);
$post_id = wp_insert_post($post, $wp_error = '');
}
}
One proper user is getting created but posts are getting created twice here. I am stucked here.
Any help on this will be highly appreciated. Thanks in advanced.
]]>I have multisite website,
top level domain (domain. com) use db: wp_
subdomain (one.domain. com) use db: one_
if I post in subdomain (db: one_), how to duplicate post to top level domain (db: wp_) and permalink with subdomain (one.domain. com/read/title)
This time, I twice posting, subdomain and top level domain.
Thanks your support.
]]>I have a special need. I did a long time google but no perfect solution.
I am looking for a Plugin enable to automatically insert certain html into post by category.
That means, I can pre-define a html content and relate it with one category.
Then if I publish a new post by selecting this category, those html will be automatically insert into post.
A idea example, I have two categories, flight and train.
If I post a article with flight category, I need to insert “Welcome my airport ” on every post head or bottom.
If I post a article with train category, I need to insert “Welcome my Railway station” on every post head or bottom.
I need such a plugin which can do this automactically.
I am looking forward to your answers!
Thanks in advance!
So, we have a custom CMS in which writers we’ve hired write articles for clients of ours. We are tryint to take the content of those articles and publish them on our clients’ WP sites. At this point, this is a manual process and a real pain in the behind.
I’m trying making a custom plugin that pulls article data from our custom CMS and (what we want it to do is) creates a new post with the title, article, ad some other content to the client’s WP site. Ideally, we would install the plugin on our clients’ sites and it would then start to pull articles hourly (using a cron job plugin or something) from our in house CMS straight into our client’s sites as new posts.
I am having some trouble writing the plugin. I want to make it so that on activation, this plugin hits our CMS’ database and starts making new posts. I’m unsure as to what
Here is what I have so far (I am unsure as to what do to in the add_action() function/ how to do it).
<?php
/**
* @package New
* @version 1.6
*/
/*
Plugin Name: CMS
Plugin URI:
Description: Practice
Author: Moe
Version: 1.0
Author URI: N/A
*/
function cms_db_connect(){
//global $wpdb;
$cms_wpdb = new wpdb( 'ourdbusername', 'password', 'dbname', 'hostname');
$cms_wpdb->show_errors();
$sql = "
SELECT * from articles as a
INNER JOIN campaign_keyword as ck ON a.keyword_id = ck.keyword_id
INNER JOIN client_campaigns as cc ON ck.campaign_id = cc.campaign_id
INNER JOIN client_wp_credentials as cwp ON cc.client_id = cwp.client_id
WHERE a.article_status = '5' LIMIT 3";
//die(print_r($sql));
$cms = $cms_wpdb->get_results($sql);
foreach($cms as $key => $value){
$title = $key['title'];
$author = $key['ordered_by'];
$body = $key['richtext_body'];
//doing some more stuff here
}
return $cms;
}
add_action('','cms_db_connect', 10, 2);
/*
*/
?>
]]>