• Resolved stevenminix

    (@stevenminix)


    Hi I have a video tube website and it has hundreds of posts each containing en embedded video. I have noticed a couple of these embeds were deleted form the source websites. I cannot keep track of this when it happens. Is there any way to add “please report broken or not working videos my email” to every post on my website in bulk at one time? Instead of going to each of my 498 posts one by one and adding it?

    Thanks,
    Steven

Viewing 7 replies - 1 through 7 (of 7 total)
  • Brett

    (@bdeaton108)

    You can always modify the single.php with that line of textand place it inside the loop.

    Thread Starter stevenminix

    (@stevenminix)

    I am not too advanced. Could you be a little more specific? I know where single.php is but how do I “place it in the loop”?

    Brett

    (@bdeaton108)

    For some light reading about the Loop, you can find the article here. While it may look very advanced at first, it really isn’t. In your case, on single.php you are looking for the the_content(); template tag. If you find it, that is where all your post content gets placed onto the page.

    What we are looking for is the endwhile statement. What you want to do is a line above the endwhile place the HTML code you stated above. Such as:

    <p>Please <a href="mailto:[email protected]">report</a> broken or not working videos.</p>

    Once you have something like the above, save the template file and go view a blog post.

    Thread Starter stevenminix

    (@stevenminix)

    My theme has three different single.php files only one had the phrase “endwhile” I placed the code you mentioned in the line above where I saw “endwhile” but it did not appear in the posts. Here is the code:

    <?php
    /*
    Template Name Posts: Single Posts
    */
    ?>
    <?php
    global $data;
    get_header();
    ?>
    <div class="container wraper">
    <div class="content-spacing margin-top-bottom">
    <div class="row">
    <div class="col-sm-6 content-spacing">
    <div class="midd-bar">
    
    <div class="recent-post-box clearfix">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    						<h2 class="maintitle"><?php the_title() ?></h2>
    							<div class="entry"><!--entry-->
    								<?php the_content(__('Read more ...', 'wptube')) ?>
    							</div><!--/entry-->
    						<?php endwhile; endif; ?>
    	</div>
    
    	</div><!-- close .main-content-inner -->
    	</div>
    
    	<div class="col-sm-2 content-spacing">
    
    	</div>
    
    	<div class="col-sm-4 content-spacing">
    	<?php get_sidebar('right'); ?>
    	</div>
            <!-- close .sidebar-padder -->
    </div>
    </div>
    <div class="spacingfooter"></div>
    </div>
    </div>
    
    <?php get_footer(); ?>

    Thread Starter stevenminix

    (@stevenminix)

    So where should I place the code in the above body? i tried the line in between these two: </div><!–/entry–>
    <?php endwhile; endif; ?>
    </div>

    did not work

    Thread Starter stevenminix

    (@stevenminix)

    Hi, nevermind. I found out the singl.php was using another file called post.php to get the data. So I put it in post.php and it worked. thank youf or your time I appreciate it.

    Brett

    (@bdeaton108)

    GREAT! Glad it worked for you and glad to help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Mass post edit’ is closed to new replies.