Reordering elements in shortcode-processing.php
-
I’m using a portfolio grid that offers several different display styles. The style I want to run with needs to be slightly altered, because for some reason, the developer decided to place the excerpt ABOVE the title. I’d like to reverse it.
The file responsible for this is called shortcode-processing.php. It’s located the theme’s tinymce folder. It’s super easy to simply edit that file by putting the h3 element above the p element, but I’d like to see if I can understand how to accomplish this in my child theme, so I don’t affect the core theme files.
I’m assuming it’s probably a custom function (???), which I understand in theory but not sure where to begin, since it seems like this particular chunk isn’t assemble in the loop…it’s pulled from a list of pre-built configurations.
Maybe there’s a different solution altogether. Offending code block below. All I need to do is put that h3 above the project-excerpt statement.
Any help is appreciated!
<div class="vert-center"> <?php if(!empty($using_custom_content) && $using_custom_content == 'on') { echo '<div class="custom-content">' . do_shortcode($custom_content) . '</div>'; } else { ?> <?php if(!empty($project_excerpt)) { echo '<p><span>'.$project_excerpt.'</span></p>'; } elseif(!empty($options['portfolio_date']) && $options['portfolio_date'] == 1) echo '<p><span>' . get_the_date() . '</span></p>'; ?> <h3><?php echo get_the_title(); ?></h3> <svg class="next-arrow" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 39 12"><line class="top" x1="23" y1="-0.5" x2="29.5" y2="6.5" stroke="#ffffff;"/><line class="bottom" x1="23" y1="12.5" x2="29.5" y2="5.5" stroke="#ffffff;"/></svg><span class="line"></span></span> <?php } ?> </div>
The topic ‘Reordering elements in shortcode-processing.php’ is closed to new replies.