you need the full path like
include( get_template_directory() . '/data.php' );
if the file is in mesocolumn/data.php
if its in mesocolumn/lib/templates/data.php then
include( get_template_directory() . '/lib/templates/data.php' );
Thank you for your advice.
<?php include( get_template_directory() . '/data.php' ); include( get_template_directory() . '/icon.php' ); ?>
The script above works but when I put it in Theme Editor in header.php
It is not executed after inserting into ‘Ad location’ window – “Top Header”.
So, my question is now where should I paste the script to have the text just below the weather banner?
you can’t add this code in ad location in customizer. try add this to functions.php
remove_action('bp_inside_header','meso_add_topheader_ads');
function meso_add_topheader_alt_ads() {
$header_banner = get_theme_mod('header_embed');
if($header_banner) {
echo '<div id="topbanner">' . stripcslashes(do_shortcode($header_banner)) . do_action('bp_inside_top_header') . '</div>';
}
}
add_action('bp_inside_header','meso_add_topheader_alt_ads');
/* add the custom ads */
function meso_add_header_custom_ad() {
include( get_template_directory() . '/data.php' );
include( get_template_directory() . '/icon.php' );
}
add_action('bp_inside_top_header','meso_add_header_custom_ad');
Thank you for your code. I entered it to functions.php. In ad location in customizer I still have:
<img src='http://slesinpogoda.cba.pl/pogoda.php' style='margin:1px' alt='' align='right' />
because when I deleted it all script disappeared.
Now, the text is in a correct area but still there are double banners visible and the text from data.php is above the banner, not under it and not starting in the same line as a banner 🙁
http://gminaslesin.futurehost.pl/
remove the previous code and add this
function meso_remove_init_call() {
remove_action('bp_inside_header','meso_add_topheader_ads');
}
add_action('init','meso_remove_init_call');
function meso_add_topheader_alt_ads() {
$header_banner = get_theme_mod('header_embed');
if($header_banner) {
echo '<div id="topbanner">' . stripcslashes(do_shortcode($header_banner));
echo '<div style="clear:both;">';
echo do_action('bp_inside_top_header');
echo '</div>';
echo '</div>';
}
}
add_action('bp_inside_header','meso_add_topheader_alt_ads');
/* add the custom ads */
function meso_add_header_custom_ad() {
include( get_template_directory() . '/data.php' );
include( get_template_directory() . '/icon.php' );
}
add_action('bp_inside_top_header','meso_add_header_custom_ad');
this is css or html issue, you need to adjust it yourself, i cannot help you step by step when it involve css or html. i have no idea what the code in data.php are.
best step, try add class to the div like this
echo '<div class="secbanner" style="clear:both;">';
and add this css
.secbanner img {position:absolute;right:20px;top:90px;}
.secbanner {font-size:10px;text-align:left;line-height:15px;}
.secbanner b {display:inline;clear:none;}
.secbanner center {text-align:left;}
Thank you very much for your help. Your last advice was also useful. I modified css and now it lookes fine.
By the way, by default below my logo I have all positions of menu in blue (main categories). Is it possible to make them colourful so that they have colours of particular categories?
The last think – translations of such parts like: “You are here: Home”, “No Comment”. Could you indicate me where can I change it into my language?
If it goes about colorful menu I managed to do it by creating Custum Menu and set it as a Primary Menu. However, I had to delete descriptions of categories because they were also visible.
The last think – translations of such parts like: “You are here: Home”, “No Comment”. Could you indicate me where can I change it into my language?
this is a translation method, check wp codex on how to translate to your language.
#description
there’s no need to delete the category description, you just need to edit the ‘description’ in each item on menu.
http://www.dezzain.com/wordpress-tutorials/how-to-use-wordpress-navigation-menus/
check #3 but in your case delete menu description.
-
This reply was modified 8 years, 9 months ago by
Richie KS.
-
This reply was modified 8 years, 9 months ago by
Richie KS.
I submitted my translation proposals. I hope they will be approved and introduced.
In other themes I had a possibility to see quantity of reads for every post next to the number of comments for each post. So it was a nice and fast confirmation how many people opened particular posts. Is there maybe a script to add such info in Mesocolumn Theme next to the comment info?
the theme did not have this. try using plugin.
Indead, I used WP-PostViews plugin and I have it.
Another thing. Next to the label (caption) of images inserted into the text of post or page there is a short horizontal line, e.g. on the page http://gminaslesin.futurehost.pl/o-gminie/srodowisko-przyrodnicze/. How to get rid of it? Where can I do it?