Forum Replies Created

Viewing 15 replies - 1 through 15 (of 106 total)
  • Hi @greta0,

    Can you provide a link with an example for your video? We might need to see the context.

    When I add a video using the WordPress classic editor or Gutenberg, the video is embedded as a responsive video, and I do not see black bars. You may have a special case.

    Following is more of a technical treatment of this issue.

    In general, to avoid seeing the black bars (background), you’ll want to do two things.
    1. Make sure your video is responsive, so that it changes size with its container.
    2. Make sure the video container is the same aspect ratio as the video.

    The aspect ratio is the width divided by the height of the video. You see the black bars, when the video viewer is too tall or too wide for the video. If you make sure the viewer is the same ratio as the video, you should not see the black bars.

    Depending on your case, you may need to edit the CSS code to constrain the height and width of your video’s container. The container would be some kind of HTML tag surrounding the viewer.

    Here is an explanation about creating a responsive video: https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php

    In the examples presented in the article, they use an aspect ratio of 16:9. If you had a video with width 1600px and height 900px, that would be 16:9. If you divide that in half, you get 800px by 450px, and that’s still 16:9 ratio.

    If you use the strategy described in the article to vary the height of your video’s container as a function of its width, you would divide the video’s width by its height to get a decimal percent you can apply to the bottom-padding style. 16:9 would be 9 divided by 16, or 56.25%.

    I hope some of this helps!

    Thread Starter Patrick Jackson

    (@pjackson1972)

    Hi Marcel,

    I was able to gain some insight into the issue. Although I don’t quite have the specifics nailed down, I think it was related to memcached. My short term solution was to turn off memcached.

    First, let me answer your questions…

    It is almost as if the term_order field is not in the database tables. Could you check that they exist? And do they have values after updating the order?
    Also, is there anything in the logfiles?

    The Custom Taxonomy plugin was storing changes to the term_order field as expected in the database. The field existed, and was being updated when I clicked the Update Order button. There weren’t related errors showing in any of the logs.

    The issue was that when the page loaded, a cached version of the term objects (or maybe the query) was used. If I were being more specific in my earlier description (I wasn’t sure this was the case at the time), the terms were reordered, but it only worked the first time. Subsequent updates didn’t appear to work because the page was loading the cached objects as indicated by echoing a var_dump() of $terms. However, when I looked in the database, the term_order field on the records did show the updated values. Since the term_order fields stored in the database didn’t match the term_order fields in the query results on the page, I could only imagine that caching was the culprit.

    The instances were running on SiteGround with memcached activated on the server. As I understand it, in order to take advantage of memcached, you need to use their SuperCacher plugin. The plugin is responsible for communicating with the caching system external to the WordPress installation.

    Now, my understanding is pretty hazy, but I suspect the SuperCacher plugin may need some attention, because it looked like caching wasn’t activated in the plugin. However, whenever I purged memcached my most recent changes were reflected on page load.

    I think disabling the plugin didn’t work because I failed to purge the cache immediately before disabling the plugin. Since the caching system lives outside of WordPress, I think the objects continued to be cached, making it appear the issue was not a plugin conflict.

    I mentioned, our DEV instance did not have the issue. Although it did have caching activated at the server level, it did not have the SuperCacher plugin installed. So, I think this boils down to a conflict with the SuperCacher plugin insofar as I think if it hadn’t been installed, we wouldn’t have seen an issue.

    I noticed that the term orders were stored using prepared statements, and wondered if the caching plugin was having a problem with them for some reason. It looked like memcached wasn’t being triggered to purge on update.

    In any case, this sounds more like an issue with the caching plugin than with Custom Taxonomy Order. Turning off caching at the server level seems to have fixed the issue for now, and I’ll follow up with SiteGround and troubleshoot their plugin to further resolve the issue and hopefully get caching to work reliably.

    Thank you for your help, and thanks again for all your great work on this plugin!

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi juliparaiso,

    I’m sorry to hear you’re having trouble. Plugin conflicts can be tricky to track down. In order to address this, we’d need to know what plugins are conflicting. We also need to rule out a conflict with your theme.

    To do this, we need to deactivate only Posts in Page, and see if you still have the issue. If the issue still exists after deactivating, the problem is probably with another plugin. If the problem goes away, then it probably IS a conflict with this plugin.

    If you’re sure it’s this plugin, then we’ll want to rule out a theme conflict by activating a different theme. We recommend using a WordPress default theme such as TwentyTwelve. If you see the same problem with the default theme, then it’s probably a plugin conflict.

    Next, you’ll need to deactivate the other plugins, and check combinations of plugins to see which ones are conflicting.

    Once we have the issue narrowed down, we can start looking at the details of what’s causing it.

    It can be a painstaking process to track down.

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi gjuddy,

    Sounds interesting! I’d handle that by concatenating the title using get_the_title(). Try this….

    <?php echo do_shortcode("[ic_add_posts tag='" . get_the_title() . "' showposts='3']"); ?>
    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi rosepog,

    The reason your images aren’t showing probably has to do with the way excerpts are filtered by default. When content is automatically displayed using the the_excerpt() function, it removes HTML like links and image tags.

    You can get around this by explicitly adding your excerpt to the Excerpt metabox when editing your post. Much of the HTML entered here is honored.

    If you want to see your featured image, you’ll need to customize the plugin template as discussed here.

    I hope that helps!

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi Elcho,

    That’s a good suggestion, we’ll keep it in mind! Thanks!

    Forum: Plugins
    In reply to: [Posts in Page] Idea?
    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi laura.lee,

    I’m glad to hear you like the plugin, and I like your idea. We’ll think about ways to make it easier to add a Read More link.

    In the mean time, there are a couple of ways to add a Read More link right now. First, you can customize the plugin template and add your own read more link after the the_excerpt() call.

    <div class="entry-summary">
        <?php the_excerpt(); ?>
        <a class="more-link" href="<?php the_permalink();?>"><?php _e('Continue reading');?> <?php the_title();?></a>
    </div>

    If you only want the link to show when your content exceeds the cutoff for the excerpt, you can add the following to your functions.php file in your theme.

    function excerpt_ellipse($text) {
       return str_replace('[...]', ' <a href="'.get_permalink().'">Continue...</a>', $text);
    }
    add_filter('get_the_excerpt', 'excerpt_ellipse');
    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi Mykmyk,

    It looks like you need to override the .post and/or .hentry class in your stylesheet. Maybe try adding something like the following to your custom CSS.

    .ivycat-post{
        margin: 20px !important;
    }

    You may need to make it more specific since you have an !important flag on your .post class. For example, you may have to use a selector of .post.ivycat-post.

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi Tara,

    It looks like your events and action categories have slugs of 'events-2' and 'action-2' whereas news is just 'news'. Make sure you’re using the category slugs and not the names.

    Try adding the “-2” to your category calls for action and events, and see if that helps.

    [ic_add_posts category='action-2']
    [ic_add_posts category='events-2']

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi jjhealy,

    That sounds like it may be an issue with your theme. Can you provide a link to the page?

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi EddyParera,

    When you only add a category attribute to your shortcode, the plugin will try to pull all members of that category regardless of post type.

    Try adding the post_type attribute in addition to the category attribute. If you set post_type='post', you shouldn’t see any pages in your list.

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi jvargas,

    The short answer to your question is no.

    This article by Yoast explains that the SEO plugin doesn’t index the contents of shortcodes, and the Posts in Page plugin doesn’t take advantage of the hook he provides (yet) to make it friendly to his plugin.

    I’ve added a suggestion to the github repo to add support for that hook.

    Thanks for bringing this to our attention!

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi nazsect,

    The position of the list depends on how your theme places content in the page. You can use a combination of HTML and CSS within the editor to help affect this, or create a custom page template for more advanced customization.

    Can you provide a link to your page?

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi bogosavljev and GrandSlambert,

    The short answer to this is that this looks like a theme conflict.

    The posts in page plugin doesn’t add [raw] shortcodes to content, and I haven’t seen this issue on other sites that have updated to 4.x.

    I can’t really diagnose this issue further without spending some quality time with your site in a development instance.

    Having said that, I ran across this post. Maybe it will shed some light?

    Plugin Contributor Patrick Jackson

    (@pjackson1972)

    Hi seanbugeja,

    Yes, it can be tricky to get customizations to work.

    The first thing we’ll need to do is make sure your custom posts loop template is working.

    1. Copy the posts_loop_template file
    Copy the file located at…
    [site root]/wp-content/plugins/posts-in-page/posts_loop_template.php

    … into your theme directory. In your case, I believe it should be located here:
    [site root]/wp-content/themes/museum-core/posts_loop_template.php

    2. Test your custom posts_loop_template
    Sometimes I like to add some test code just to be sure it’s working. For example, I might add the word HELLO! to the title by changing the line…

    <!-- 	This outputs the post TITLE -->
    	<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

    … to…

    <!-- 	This outputs the post TITLE -->
    	<h2 class="entry-title">HELLO! <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

    If it’s working, you should see HELLO! added to the beginning of every title in your list. If you don’t see that, we’ll need to investigate to see why.

    3. Add thumbnail image
    Once that’s working, add the following where you’d like to see the thumbnail. For example, you might add it just before the Title. We can tweak the location and styling once you know it’s working.

    <!-- This will output of the featured image thumbnail  -->
    	<div class="featured-image">
    		<?php the_post_thumbnail( 'thumbnail' ); ?>
    	</div>
    
    <!-- 	This outputs the post TITLE -->
    	<h2 class="entry-title">HELLO! <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

    4. Remove the line posted in: Author: Comments off
    To remove this information, just delete the following.

    <!--	This outputs the post META information -->
    	<div class="entry-utility">
    		<?php if ( count( get_the_category() ) ) : ?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'posts-in-page' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>
    		<?php
    			$tags_list = get_the_tag_list( '', ', ' );
    			if ( $tags_list ):	?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'posts-in-page' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>
    		<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'posts-in-page' ), __( '1 Comment', 'posts-in-page' ), __( '% Comments', 'posts-in-page' ) ); ?></span>
    		<?php edit_post_link( __( 'Edit', 'posts-in-page' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    	</div>
    
            <?php comments_template(); ?>

    You should be left with your featured image, title, and excerpt after that.

    I hope that helps!

Viewing 15 replies - 1 through 15 (of 106 total)