Forum Replies Created

Viewing 15 replies - 151 through 165 (of 247 total)
  • Plugin Author Criss Swaim

    (@cswaim)

    You are correct in the tag option will pull posts by tags.

    try this->r[‘tags’] to retrieve the tag value

    BUT….since this bit of custom code will be lost if you upgrade the plugin, be careful. Also, using the tag option may have other impacts. What you might try is to pass in an option like header=’venice’, which appends the option to the end of the plugin options array and then access as this->r[‘header’]

    Of course none of this is supported, but post your results back here as it may be helpful to others.

    Plugin Author Criss Swaim

    (@cswaim)

    It depends on how specific you write the css. if you write the css for the class within the tpg-get-posts div only, then it only suppresses the display for the posts being rendered by the plugin.

    You will have to do some work to determine the specificity of the needed css.

    Plugin Author Criss Swaim

    (@cswaim)

    From my comment above:

    By putting the css in the custom css file in your template,
    the changes will not be lost with upgrades to the plugin.
    And if you are using a child template, upgrades to the
    template will not affect the custom css which is in
    the child theme folder.

    If you follow the guidelines in the doc for custom styling, the only time you need to be concerned with loosing the css changes is when you upgrade the theme. Or if you use a child theme, only when you upgrade the child theme. An additional reason for using child themes.

    If you change the plugin css directly, then the changes will be lost, so don’t do that. Set up a custom css file.

    This really is beyond the support of plugin, But since I’m here……

    turn on the WP debug feature:
    define('WP_DEBUG', true);

    I have found some code errors, although only warnings will cause pages to fail to load. Several functions in WP have been deprecated in the last few releases and those applications (plugins or themes) which have not kept up are starting to create problems. The debug option will throw errors and warnings to show where the problems are being encountered.

    Hopefully that will get you started.

    Plugin Author Criss Swaim

    (@cswaim)

    It seems that the solution provided by msubretort which uses css to hide the YARRP is the quickest way forward at this point. This technique could also be applied to QuickAdsense and any other post plugin.

    Use custom css (see doc for placement location) and then provide the specific tag to hide, starting with the tpg division. Use a browser debugger to find the exact sequence of tags to hide so only those YARRP classes in the tpg-get-post div are hidden.

    By putting the css in the custom css file in your template, the changes will not be lost with upgrades to the plugin. And if you are using a child template, upgrades to the template will not affect the custom css which is in the child theme folder.

    What the plugin should do is accurately display the post on a static page. Then allow you to customize display options.

    The other option is with the premium version you can call a custom function and turn off/on the hooks for the post. While the plugin supports that capability, it is up to the developer to write the code. I am unable to support custome php solutions, but here is what my testing code looked like (with echo’s for testing included)

    function tpg_gp_pst_post_filter($content,$cfp=null) {
    	/*
    	 * the following code is a sample to add the MPR & Yet Another Related post plugins
    	 * uncomment to activate sample
    	*/
    	echo "in pst_post filter<br>";
        add_filter('the_content','MRP_auto_related_posts');
        global $yarpp;
        add_filter('the_content', array($yarpp,'the_content'), 1200);
    	return $content;
    }
    
    /**
     *	tpg_gp_pre_plugin_filter
     *
     * allow custom function to be invoke before content
     *
     * @param	string	content
     * @param	string	custom function parm
     * @return	string  content
     *
     */
    function tpg_gp_pre_plugin_filter($content,$cfp=null) {
    	/*
    	 * the following code is a sampe to turn off MPR & Yet Another Related post plugins
    	 * uncomment to activate sample
    	*/
    	echo "in pre_plugin filter<br>";
        remove_filter('the_content','MRP_auto_related_posts');
        global $yarpp;
        remove_filter('the_content', array($yarpp,'the_content'), 1200);
    	return $content;
    }
    Plugin Author Criss Swaim

    (@cswaim)

    Thank you!

    Plugin Author Criss Swaim

    (@cswaim)

    Yes, the shorten_content feature is risky as it either counts characters or words (defined by space separation) and trims the content when the limit is reached. It is not aware of html tags. It should only be be used when control over content is very controlled. Using the read-more tag is safer.

    I will update the doc to reflect this restriction.

    Plugin Author Criss Swaim

    (@cswaim)

    I misspoke in my earlier post….The category_name (or cat) uses the category name not the slug. So if your category name is Swelling and Water Retention then use cat=”Swelling and Water Retention”

    Be sure the post is assigned to the category. It looks like your post title is the same as the category, which is not a problem, but the post does have to be assigned to the category. I hope that clears up the problem.

    Plugin Author Criss Swaim

    (@cswaim)

    I believe your cat name slug is swelling-and-water-retention. Caps are important! I think the wp query uses the slug and not the description.

    Plugin Author Criss Swaim

    (@cswaim)

    Generally, when the plugin behaves like this it is because the parms are not valid – ie misspelling, invalid, ….

    On your shortcode, numberposts is numeric and the show_meta is listed twice. But recheck your category names, usually this is the problem. Show the meta line so you can see how each post is categorized and can verify the spelling.

    I would suggest removing all the parms except the category and then add them one by one to figure out which is causing the problem.

    With the latest release, I tried to simplify the parms so your final shortcode could look like this:

    [tpg_get_posts fields=”title,content” show_excerpt=”true” cat=”swelling-and-water-retention” numberposts=99]

    Plugin Author Criss Swaim

    (@cswaim)

    I have not tried to prevent the style sheet from loading, so this is untested. If the wp_deregister_style is not working you might try

    <?php wp_dequeue_style( ‘tpg_get_posts_css’ ) ?>

    Plugin Author Criss Swaim

    (@cswaim)

    The show_excerpt option expects the custom excerpt field on the post screen to be contain the excerpt. When using the show_excerpt, no ‘read more’ link is displayed. If you want a teaser to show with the ‘read more’, use the ‘more’ tag in the editor.

    If you do not see the excerpt box on the post entry screen, then check the excerpt box under the options at the top of the page.

    Plugin Author Criss Swaim

    (@cswaim)

    MCM – If your are still monitoring this, I looked at the plugin and realized that it will pull custom posts

    use the parm post_type=”myCustomPost”

    Undocumented feature…..

    Plugin Author Criss Swaim

    (@cswaim)

    At this time, the custom taxonomy is not supported. It does require special handling of the parms passed to the plugin as custom taxonomy is expecting an array and all parms are passed as strings or numbers.

    When adding the other selection criteria which require arrays, I left the custom taxonomy off as I did not have time to test it. In 3 years, you are the first to request it and I have not needed to use it, so it is a low priority.

    I am open to adding the feature to the premium version, but it will be a couple of weeks before I can focus on this.

    Plugin Author Criss Swaim

    (@cswaim)

    The published date is only shown on the byline. Your code is only displaying the title. At this time the plugin does not permit customizing the title line.

Viewing 15 replies - 151 through 165 (of 247 total)