Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

Montezuma Head Not work meta tags


  #1  
Old Dec 20, 2012, 07:50 AM
darkcrizt's Avatar
darkcrizt
 
6 posts · Dec 2012
Hi I tried to add the meta tags to the header of wordpress, the problem with that is I am trying to define the description with the extract of the entry, checking the source code does not show me anything leaving the field blank.

There will be some solution to this, I have tried several methods and the result is the same as testing with different codes show here.
HTML Code:
<meta name="description" content="<?php bfa_excerpt( 40, ' ...' ); ?>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="<?php the_permalink(); ?>" />
<meta property="og:title" content="<?php the_title(); ?>" />
<meta property="og:description" content="<?php the_excerpt(); ?>" />
<meta itemprop="url" content="<?php the_permalink(); ?>" />
<meta itemprop="name" content="<?php the_title(); ?>" />
<meta itemprop="description" content="<?php bfa_excerpt(40, 'text???' ); ?>" />
<meta name="twitter:card" value="summary" />
<meta name="twitter:url" value="<?php the_permalink(); ?>" />
<meta name="twitter:title" value="<?php the_title(); ?>" />
<meta name="twitter:description" value="<?php bfa_excerpt(); ?>" />
I have had other problems in a matter of inserting code to the topic, I realize that the subject is very limited with php to limit to a few functions.
It would be good that this limitation of the subject removed to insert php code freely.
Attached Thumbnails
Click image for larger version

Name:	estamosjodios.png
Views:	1923
Size:	75.9 KB
ID:	2137  

Last edited by darkcrizt; Dec 21, 2012 at 09:22 AM. Reason: solved
  #2  
Old Dec 20, 2012, 08:58 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Quote:
It would be good that this limitation of the subject removed to insert php code freely.
you will have to talk to the WordPress theme review team about this. They have restricted the use of the 'eval()' function from themes. With the Atahualpa theme you use to be able to put php in almost any option, but then the review team rejected the use of the 'eval()' and that feature had to be removed from the theme. I don't think their reasoning was very plausable, but Flynn (the developer of Atahualpa and Montezuma) had to remove it or the theme would be rejected.

Quote:
I tried to add the meta tags to the header of wordpress, the problem with that is I am trying to define the description with the extract of the entry
1) Where did you add the tags? Exactly.
2) what do you mean you trying to 'extract of the entry'?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Dec 21, 2012 at 05:18 AM.
  #3  
Old Dec 21, 2012, 01:01 AM
darkcrizt's Avatar
darkcrizt
 
6 posts · Dec 2012
I think I got it wrong, never speak of eval in theme options shows off a gallery of its functions limited to 60 even giving the notice
"Note: This is a limited set of PHP functions. You can not use arbitrary PHP code. You can only use the functions listed here are That. You can not use PHP Also conditions or loops etc ... Just what you see listed here. "

You can not use arbitrary PHP code, is what I meant, it would be nice to be able to use arbitrary PHP code, but that's another thing.

A question to find a solution and to find some function or php code to allow me to show what I wanted to find him still
PHP Code:
// Meta desc.
function create_meta_desc() {
    global 
$post;
if (!
is_single()) { return; }
    
$meta strip_tags($post->post_content);
    
$meta strip_shortcodes($post->post_content);
    
$meta str_replace(array("\n""\r""\t"), ' '$meta);
    
$meta substr($meta0120);
    echo 
"<meta name='description' content='$meta' />";
    echo 
"<meta property='og:description' content='$meta' />";
    echo 
"<meta itemprop='description' content='$meta' />";
    echo 
"<meta name='twitter:description' value='$meta' />";

I hope might help others if they have the same need for me to show a description of the entries tagged goal.

I hope the creator of the note issue such limitation to insert arbitrary PHP code.
Remove many headaches and the topic would be more compatible with more plugins that require inserting your call on the issue with php code.

Last edited by juggledad; Dec 21, 2012 at 05:46 AM.

Bookmarks

Tags
limited code, meta tags, php, wordpress

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Montezuma/Woocommerce - pages rendering w/out <head> or meta data. DoverTim Montezuma Theme 12 Feb 18, 2013 04:41 AM
Montezuma.pot doesn't work luarcito Montezuma Theme 3 Nov 6, 2012 06:02 AM
Montezuma Dropdown does not work Zoidberg Montezuma Theme 1 Nov 2, 2012 02:27 PM


All times are GMT -6. The time now is 11:13 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.