code suddenly appearing from my tempate second loop

Are you absolutely certain that you don’t accidentally have a closing php tag where you shouldn’t? – yes – turned out to be that I had <? rather than <?php – probably the new server was set differently – as per https://stackoverflow.com/questions/2185320/how-to-enable-php-short-tags

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘greenday_head’ not found or invalid function name

I would start by creating in the themes functions.php a function like this public function greenday_head($args) { return $args } It may be that $args are never passed in but it seems likely they are. If you want to try to find out what this is doing then you can add: public function greenday_head($args) { … Read more

how to remove the top navigation bar or header top on wordpress website?

Looks like the author didn’t include the check for menu items before calling the top nav bar. Two methods: Dashboard –> appearance –> customize –> Additional CSS add the following piece of code and save changes: #topnav { display:none; } Create a child theme and include this page neville\template-parts\partials\headers\header-tmpl-default.php. Make sure to remove the below … Read more

How to get the POST TITLE using the POST ID?

WordPress has a ton of the get_the_*() functions which you can pass an ID and return a value you’re looking for. In this case you can call get_the_title() which returns the title of a post. An example could look like: echo get_the_title( 3249 );

Adding custom styles to dropdown in editor

You can add this code to your functions.php function add_style_select_buttons( $buttons ) { array_unshift( $buttons, ‘styleselect’ ); return $buttons; } // Register our callback to the appropriate filter add_filter( ‘mce_buttons_2’, ‘add_style_select_buttons’ ); //add custom styles to the WordPress editor function my_custom_styles( $init_array ) { $style_formats = array( // These are the custom styles array( ‘title’ … Read more

How can I upload an image for background use using the Theme Editor in WordPress?

Giving the CSS of background #FFFFFF url(‘images/newbackground.gif’); is just giving an example based on basic CSS. Be careful when copying the suggestions made in the book because you missed an important colon after background. It should be background: #FFFFFF url(‘images/newbackground.gif’); Also, you need to make sure the URL part of the CSS is correct for … Read more

Hiding styles from Facebook

You can use Open Graph Protocol to define the data Facebook fetches from your site: http://developers.facebook.com/docs/opengraphprotocol/ The metatag for the description has this form: <meta property=”og:description” content=”my custom description for single post” /> You can use plugins, like http://wordpress.org/extend/plugins/wp-facebook-open-graph-protocol/ to do it for you. You can then debug your page here: http://developers.facebook.com/tools/debug to see how … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)