backbone
Forum Replies Created
-
Forum: Plugins
In reply to: [AutoChimp] Additional Template CodesI’m assuming that you know the $posttitles, $posttags, $postcatergories, $postauthors, $postdates are custom variables that have additional code written to perform the function and you have some understanding of php and how to write those codes.
PHP is not my area of expertise, self-taught. But this is the basics for those variables:
$posttitle = $post->post_title; $postdate = mysql2date( 'F j, Y', $post->post_date ); $permalink = get_permalink( $postID );This is the basic foreach loop to get the post tags.
// If post has tags $posttagslink = ""; $posttagsall = get_the_tags( $postID ); if ( $posttagsall ) { foreach($posttagsall as $tag) { $taglink = get_tag_link( $tag->term_id ); $posttagslink .= '<a href="' . $taglink . '">' . $tag->name . '</a>, '; } $posttagslinks = rtrim( $posttagslink, ', ' ); $posttags = " | Tagged with: " . $posttagslinks; }This is the basic foreach loop to get the post categories.
// If post has categories $postcategorieslinks = ""; $postcategoriesall = get_the_category( $postID ); if ( $postcategoriesall) { foreach($postcategoriesall as $cat) { $catlink = get_category_link( $cat->term_id ); $postcategorieslinks .= '<a href="' . $catlink . '">' . $cat->name . '</a>, '; } $postcatlinks = rtrim( $postcategorieslinks, ', ' ); $postcategories = " | Posted in: " . $postcatlinks; }This is the code for single author environment
$postauthorsID = $post->post_author; $postauthorname = get_the_author_meta( 'display_name', $postauthorsID ); $postauthors = 'by <a href="'. get_author_posts_url( $postauthorsID ) . '">' . $postauthorname . '</a>';Hopefully this can give you some direction and you can modify it to your particular needs. Good luck!
Forum: Plugins
In reply to: [AutoChimp] Social media links in email notificationYou need to append the social links to the $postContent variable in autochimp.php
Forum: Plugins
In reply to: [AutoChimp] Three dots, no "read more" linksYou can read my full explanation here https://wordpress.org/support/topic/additional-template-codes?replies=2
Forum: Plugins
In reply to: [AutoChimp] Main SectionYou need to create a template from the Code Your Own.
Templates > Create Template > Code Your Own > Paste Your Code
If it’s not already in Edit code, click the Edit Code link near the bottom of the screen. Scroll down until you see the <div mc:edit=”std_content00″> </div> tag. Delete all the content you don’t want. Then you insert the <div mc:edit=”main”>Main</div> and complete any other edits and customization to the template.
Once you save the template and you have the MailChimp api key, in AutoChimp, fill out the api key field, save. Then in the Campaigns section, Add new post category mapping. Select the fields and then your saved user template will show up in the drop down for template section.
Forum: Plugins
In reply to: [AutoChimp] Additional Template CodesTo add Featured image to the email:
// Include Featured Image post if ( has_post_thumbnail( $postID ) ) { $postthumbnail = '<div style="float:left;margin-top:5px;margin-right:15px;margin-bottom:9px;">'. get_the_post_thumbnail( $postID,'thumbnail' ) .'</div>'; }Then insert the variable where you want it to appear in the post content. My example is
$content[$htmlContentTag] = '<h1 class="h1"><a style="color:#ed0c06;text-decoration:none;" href="' . $permalink . '">' . $posttitle . '</a></h1><p>' . $postauthors . '</p><p style="margin-top:15px;padding-top:10px;">' . $postthumbnail . $postContent . '</p>';The editing for content to be sent happens at the Autochimp plugin level. I also added code to send the Author(s) (includes multiple authors using CoAuthor Plus plugin), Categories, & Tag data as well as the inline style markup.
This is my edit for the $postContent variable:
$postContent = wp_trim_words( $post->post_content, 100, ' [...]<div style="display:block;text-align:center;width:100%;margin-top:15px;margin-bottom:25px;padding-top:15px;padding-bottom:25px;"><a style="padding-top:15px;padding-right:25px;padding-bottom:15px;padding-left:25px;color:#ffffff;background-color:#ed0c06;" href="' . $permalink . '"><strong>Read the full post here »</strong></a></div><div><p>' . $postdate . $postcategories . $posttags . '</p></div>');You will want to make your edits in this section of autochimp.php file:
function AC_CreateCampaignFromPost( $api, $postID, $listID, $interestGroupName, $categoryTemplateID ) {... }Forum: Plugins
In reply to: [AutoChimp] Three dots, no "read more" linksTo add Featured image to the email:
// Include Featured Image post if ( has_post_thumbnail( $postID ) ) { $postthumbnail = '<div style="float:left;margin-top:5px;margin-right:15px;margin-bottom:9px;">'. get_the_post_thumbnail( $postID,'thumbnail' ) .'</div>'; }Then insert the variable where you want it to appear in the post content. My example is
$content[$htmlContentTag] = '<h1 class="h1"><a style="color:#ed0c06;text-decoration:none;" href="' . $permalink . '">' . $posttitle . '</a></h1><p>' . $postauthors . '</p><p style="margin-top:15px;padding-top:10px;">' . $postthumbnail . $postContent . '</p>';Forum: Plugins
In reply to: [Bulk Delete] Inaccurate reporting of users after deletionNo.
I ran the plugin to delete all the users with the subscriber role. I verified in the wp_users table. I bulked deleted over 2,000 at once.
However, when I view Bulk Delete Users, it shows subscriber(1,612) when it should be zero.
Forum: Plugins
In reply to: [Co-Authors Plus] only first author appearsYou need to read on how to add the coauthors function to the template.
Forum: Plugins
In reply to: [Co-Authors Plus] coauthors_wp_list_authors sorting and positioningI used this to manually sort the display order by a vaule in the user profile. This method can be tedious for a large user count.I’m not the original author.
Replace the args to your settings. But this should work with a little tweaking.
$args = array( 'blog_id' => '37', 'meta_query' => array( array( 'key' => 'display_order', //My custom meta key to only display specific, handpicked authors 'value' => null, 'compare' => '!=' ) ) ); $authors = get_users($args); // Get users satisfying our parameters function cmp($a, $b){ //The function to order our authors if ($a->display_order == $b->display_order) { //This is where the name of our custom meta key is entered, I named mine "order" return 0; } return ($b->display_order > $a->display_order ) ? -1 : 1; //The actual sorting is done here. Change ">" to "<" to reverse order } usort($authors, 'cmp'); //usort sorts our $users array with our function cmp()Forum: Themes and Templates
In reply to: [Sigma] responsive version problemAndroid (depending on version) doesn’t recognize the unicode ☰ that is used to create the Hamburger menu icon. You will need to edit the assets/js/sigma.min.js and replace ☰ with ≡ http://unicode.johnholtripley.co.uk/2261/> Or use an image or @font-face to render 100% devices.
Forum: Plugins
In reply to: [Electric Studio Auto Post Expire] Time LeftA short code for this feature?
Forum: Plugins
In reply to: [Countdown Timer] After an update on my server Countdown Timer issuesGetting identical error message with WP 3.6.1, Countdown Timer Version 3.0.5
I made changes to the code as suggested as above, but not working to show the list tweets.
plugin: 2.5.4
wp core: 3.6Forum: Plugins
In reply to: No media player plugin lets me set start time of video or music! Why?In Multisite mode, embedding is not available. Is there an ETA on v7.0?