Custom content in Single Project

Hi Guys,

I need some advice to add some custom content in “front-projects.php”. In example I want to add a couple of radioButtons and other stuff. I startet creating my own template with content I need but I want to add the content in Single Project template. I hope you can give me some advice to get further.

Some code of my custom template:


<?php
/**
 * Template Name: Fat-Form
 * Description:   do some stuff
 */
function filtere_den_inhalt_vor_dem_formular($content){

    if (is_page(389)) {
        $content = preg_replace("/\n/", "\n\t\t", $content);
        $content = preg_replace("/\t\t\z/", "", $content);
    }
    return $content;
}
add_filter("the_content", "filtere_den_inhalt_vor_dem_formular");
get_header(); ?>

    <div id="primary" class="site-content">
        <div id="content" role="main">

        <?php while ( have_posts() ) : the_post(); ?>
        <article>
            <header class="entry-header">
                <h1 class="entry-title"><?php the_title(); ?></h1>
            </header>
            <div class="entry-content">
                <?php the_content(); ?>
                <blockquote>
                <div style="float:left; margin-bottom:38px">
                <form name="eingabe" action="#" onsubmit="holeDaten(); return false" method="get">

                    <input type="radio" id="011" value="011"/> 011<br />
                    <input type="radio" name="022" value="011" /> 022<br />
                    <input type="radio" name="033" value="033" /> 033<br />
                    <input type="radio" name="044" value="044" /> 044<br />
                    <input type="radio" name="055" value="055" /> 055<br />
                    <input type="reset" value="Leeren">
                    <input type="submit" value="Details" /></p>
                </form>
                </div>
                </blockquote>
                <div id="ergebnis" class="braunpre" style="clear:both; background-color:#f8f7ea; border:1px solid #e2e2e2; padding:24px">
					<em><strong>Ergebnis der Auswertung</strong></em>
				</div>

            <script type="text/javascript">
            "use strict";

            function holeDaten() {

				var content = "";
                var doc = document.eingabe;
				
				if (document.getElementById('elf').checked) {
					content = document.getElementById('011').value;
				}
                document.getElementById("ergebnis").innerHTML = content; 
            }
            </script>
            </div>
        </article>
        <?php comments_template( '', true ); ?>
        <?php endwhile; ?>
        </div>
    </div>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Thanks in advance!

Kind regards, LiCeT

Hello LiCeT,

It looks like this issue requires some coding and testing, this goes beyond our support policy. It’s considered advanced customization. As an option, you can find a reputable freelancer on Upwork for this kind of service.

Kind Regards, Roman.

Hi Roman,

thanks anyway. Did by myself.

Kind regards, LiCeT

Great! Please note that you have to override modified .php files in a child theme in order to avoid losing modifications after theme update.

Kind Regards, Roman.