It happens that the generated data is stored in a separate file. And the task is to output, for example, titles with a preliminary check of already existing values (not empty) in a third-party file. An example of the implementation is below: <?php include($_SERVER['DOCUMENT_ROOT']."/seo.php"); if(isset($seoh1) AND $seoh1!='') { echo $seoh1; …
Read More »PHP
Title for bitrix pagination
I will not describe why this is necessary, I will only publish a ready-made solution. else echo $APPLICATION->ShowProperty("meta_title"); if (isset($_GET['PAGEN_1']) && $_GET['PAGEN_1']!=1) { echo " Page ".$_GET['PAGEN_1']; } if (isset($_GET['PAGEN_2']) && $_GET['PAGEN_2']!=1) { echo " Page ".$_GET['PAGEN_2']; } if (isset($_GET['PAGEN_3']) && $_GET['PAGEN_3']!=1) { echo " Page ".$_GET['PAGEN_3']; } The disadvantage …
Read More »How to display a shortcode in a WordPress theme
Shortcodes make our life a lot easier, they are often generated by plugins and all we have to do is display the shortcode in the WordPress theme. Use code like this: <?php echo do_shortcode( '[shortcode]' );?> Where instead of shortcode write your shortcode name, and do not forget about the …
Read More »How to get value from ACF plugin field
The ACF plugin is needed to create and display additional fields for articles. For example, we need to add the color field to articles and display it in the template. The procedure is standard: go to Plugins – Add new – search for ACF (Advanced Custom Fields), install and activate. …
Read More »